diff --git a/README.md b/README.md index 71cbf2d..e9e301f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ## Configure +### NixOS + ```bash nixos-rebuild switch --flake flake_path_directory#hostname ``` @@ -10,6 +12,13 @@ nixos-rebuild switch --flake flake_path_directory#hostname nix flake update --extra-experimental-features "nix-command flakes" ``` +### Home manager on standalone Linux + +``` +nix run nixpkgs#home-manager -- switch --flake .#hostname // First time +home-manager -- switch --flake .#hostname // Then +``` + ## Show changements between revisions diff --git a/flake.nix b/flake.nix index febee3d..350f7e9 100644 --- a/flake.nix +++ b/flake.nix @@ -124,6 +124,22 @@ ] ++ extraModules; }; + + customHomeManagerConfiguration = { + name, + system + }: home-manager.lib.homeManagerConfiguration rec { + pkgs = import nixpkgs { + inherit overlays system; + }; + + modules = + home-modules + ++ [ + { nix.package = pkgs.nix; } + ./hosts/${name}/home.nix + ]; + }; in { ##################################################################### @@ -152,19 +168,8 @@ ##################################################################### ##################################################################### homeConfigurations = { - perso-home = home-manager.lib.homeManagerConfiguration rec { - pkgs = import nixpkgs { - system = "x86_64-linux"; - inherit overlays; - }; - - modules = - home-modules - ++ [ - {nix.package = pkgs.nix;} - ./hosts/perso-home/home.nix - ]; - }; + perso-home = customHomeManagerConfiguration { name = "perso-home"; system = "x86_64-linux"; }; + pro-home = customHomeManagerConfiguration { name = "pro-home"; system = "x86_64-linux"; }; }; } ##################################################################### diff --git a/hosts/pro-home/home.nix b/hosts/pro-home/home.nix new file mode 100644 index 0000000..e424be8 --- /dev/null +++ b/hosts/pro-home/home.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + imports = [ + ../../modules/home + ]; + + modules.home = { + shell = { + zsh.enable = true; + atuin.enable = true; + direnv.enable = true; + }; + }; +}