diff --git a/flake.nix b/flake.nix index 739e503..a0be822 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,8 @@ commonProfiles darwinConfigurations darwinProfiles + homeConfigurations + homeProfiles nixosConfigurations nixosProfiles ; diff --git a/src/commonProfiles/packages.nix b/src/commonProfiles/packages.nix index 9c34b2c..f1116c2 100644 --- a/src/commonProfiles/packages.nix +++ b/src/commonProfiles/packages.nix @@ -7,21 +7,22 @@ }: with builtins // lib; { environment.systemPackages = with pkgs; [ - bat - bottom - btop curl duf eza + fd fzf gdu gh git helix + home-manager + htop jq man neofetch ripgrep + rsync vim wget zellij diff --git a/src/darwinConfigurations/sakamoto/README.md b/src/darwinConfigurations/sakamoto/README.md index 5b89dd6..6c63029 100644 --- a/src/darwinConfigurations/sakamoto/README.md +++ b/src/darwinConfigurations/sakamoto/README.md @@ -1,3 +1,3 @@ -# darwinConfigurations.sakamoto +# homeConfigurations.yousiki -`sakamoto` is my personal MacbookPro (x86_64). +`yousiki` is my username. diff --git a/src/darwinConfigurations/sakamoto/default.nix b/src/darwinConfigurations/sakamoto/default.nix index 26f6837..d1c9435 100644 --- a/src/darwinConfigurations/sakamoto/default.nix +++ b/src/darwinConfigurations/sakamoto/default.nix @@ -8,6 +8,21 @@ commonProfiles.nix commonProfiles.packages darwinProfiles.applications + + # Home-manager module + globals.inputs.home-manager.darwinModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = {inherit globals;}; + users.yousiki = { + imports = [ + globals.outputs.homeProfiles.base + ]; + }; + }; + } ]; in globals.inputs.darwin.lib.darwinSystem { diff --git a/src/homeProfiles/base.nix b/src/homeProfiles/base.nix new file mode 100644 index 0000000..33ab6da --- /dev/null +++ b/src/homeProfiles/base.nix @@ -0,0 +1,14 @@ +{globals, ...}: { + config, + lib, + pkgs, + ... +}: +with builtins // lib; { + home.homeDirectory = + if hasSuffix "-darwin" pkgs.system + then "/Users/${config.home.username}" + else "/home/${config.home.username}"; + + home.stateVersion = "23.05"; +}