run nixfmt on repo

This commit is contained in:
Salar Rahmanian 2024-05-18 11:31:35 -07:00
parent 29c4ce7acd
commit 276ceac3d5
6 changed files with 93 additions and 85 deletions

View file

@ -1,4 +1 @@
{ { allowUnfree = true; }
allowUnfree = true;
}

View file

@ -7,45 +7,57 @@
url = "github:LnL7/nix-darwin"; url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nur.url = github:nix-community/nur; nur.url = "github:nix-community/nur";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = { self, nix-darwin, home-manager, nur, nixpkgs, ... }: outputs =
{
self,
nix-darwin,
home-manager,
nur,
nixpkgs,
...
}:
let let
homeManagerConfFor = config: { ... }: { homeManagerConfFor =
config:
{ ... }:
{
nixpkgs.overlays = [ nur.overlay ]; nixpkgs.overlays = [ nur.overlay ];
imports = [ config ]; imports = [ config ];
}; };
m3maxConfiguration = { pkgs, ... }: { m3maxConfiguration =
environment.systemPackages = with pkgs; { pkgs, ... }:
[ {
home-manager environment.systemPackages = with pkgs; [ home-manager ];
];
fonts = { fonts = {
fontDir.enable = true; fontDir.enable = true;
fonts = with pkgs; [ fonts = with pkgs; [ fira-code ];
fira-code
];
}; };
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
nix = { nix = {
nixPath = nixpkgs.lib.mkForce [ nixPath = nixpkgs.lib.mkForce [ "nixpkgs=${nixpkgs}" ];
"nixpkgs=${nixpkgs}"
];
package = pkgs.nixFlakes; package = pkgs.nixFlakes;
settings = { settings = {
experimental-features = "nix-command flakes"; experimental-features = "nix-command flakes";
extra-platforms = [ "x86_64-darwin" "aarch64-darwin" ]; extra-platforms = [
trusted-users = [ "root" "salar" ]; "x86_64-darwin"
"aarch64-darwin"
];
trusted-users = [
"root"
"salar"
];
}; };
distributedBuilds = false; distributedBuilds = false;
}; };
@ -76,7 +88,9 @@
home-manager.users.salar = homeManagerConfFor ./home.nix; home-manager.users.salar = homeManagerConfFor ./home.nix;
} }
]; ];
specialArgs = { inherit nixpkgs; }; specialArgs = {
inherit nixpkgs;
};
}; };
darwinPackages = self.darwinConfigurations.salarm3max.pkgs; darwinPackages = self.darwinConfigurations.salarm3max.pkgs;

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
@ -6,7 +11,9 @@
imports = (import ./programs); imports = (import ./programs);
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"discord" "discord"
"slack" "slack"
"vscode" "vscode"
@ -54,7 +61,7 @@
neovim neovim
niv niv
nix-index nix-index
nixfmt nixfmt-rfc-style
nix-prefetch-git nix-prefetch-git
nodejs nodejs
nodePackages.pyright nodePackages.pyright
@ -110,9 +117,7 @@
programs.darcs = { programs.darcs = {
enable = true; enable = true;
author = [ author = [ "Salar Rahmanian <code@softinio.com>" ];
"Salar Rahmanian <code@softinio.com>"
];
boring = [ boring = [
"^.idea$" "^.idea$"
"^.direnv$" "^.direnv$"
@ -353,4 +358,3 @@
rev = "12c5e919e829c067ba795fe7f1e02037cbc0b4e9"; rev = "12c5e919e829c067ba795fe7f1e02037cbc0b4e9";
}; };
} }

View file

@ -22,16 +22,9 @@ in
plugin = tmuxPlugins.continuum; plugin = tmuxPlugins.continuum;
extraConfig = "set -g @continuum-restore 'on'"; extraConfig = "set -g @continuum-restore 'on'";
} }
{ { plugin = tmuxPlugins.sensible; }
plugin = tmuxPlugins.sensible; { plugin = tmuxPlugins.vim-tmux-navigator; }
} { plugin = tmuxPlugins.onedark-theme; }
{
plugin = tmuxPlugins.vim-tmux-navigator;
}
{
plugin = tmuxPlugins.onedark-theme;
}
]; ];
}; };
} }