diff --git a/config/home-manager/default.nix b/config/home-manager/default.nix index 8c4543e..284a1aa 100644 --- a/config/home-manager/default.nix +++ b/config/home-manager/default.nix @@ -1,14 +1,7 @@ -{osConfig, ...}: { +_: { imports = [ ./services/udiskie.nix ./terminal ./programs ]; - home = rec { - inherit (osConfig.local.systemVars) username; - homeDirectory = "/home/${username}"; - stateVersion = "24.05"; - }; - - programs.home-manager.enable = true; } diff --git a/config/nixos/core/home-manager.nix b/config/nixos/core/home-manager.nix new file mode 100644 index 0000000..f7bfbf6 --- /dev/null +++ b/config/nixos/core/home-manager.nix @@ -0,0 +1,31 @@ +{ + config, + inputs, + ... +}: let + inherit (config.local.systemVars) username; +in { + imports = [ + inputs.home-manager.nixosModules.default + ]; + + home-manager = { + backupFileExtension = "backup"; + useGlobalPkgs = true; + useUserPackages = true; + }; + + home-manager.users.${username} = { + home = { + homeDirectory = "/home/${username}"; + stateVersion = "24.05"; + }; + + programs.home-manager.enable = true; + }; + + programs = { + # make HM-managed GTK stuff work + dconf.enable = true; + }; +} diff --git a/config/nixos/programs/default.nix b/config/nixos/programs/default.nix index 1193262..2b547d6 100644 --- a/config/nixos/programs/default.nix +++ b/config/nixos/programs/default.nix @@ -1,10 +1,5 @@ { imports = [ ./fonts.nix - ./home-manager.nix ]; - programs = { - # make HM-managed GTK stuff work - dconf.enable = true; - }; } diff --git a/config/nixos/programs/home-manager.nix b/config/nixos/programs/home-manager.nix deleted file mode 100644 index ace5c17..0000000 --- a/config/nixos/programs/home-manager.nix +++ /dev/null @@ -1,11 +0,0 @@ -{inputs, ...}: { - imports = [ - inputs.home-manager.nixosModules.default - ]; - - home-manager = { - backupFileExtension = "backup"; - useGlobalPkgs = true; - useUserPackages = true; - }; -} diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index a0090ac..8b22e27 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -22,6 +22,8 @@ in { ./config/theme.nix nixos + "${nixos}/core/home-manager.nix" + "${nixos}/hardware/uni-sync.nix" "${nixos}/services/logind.nix" diff --git a/hosts/vamos/default.nix b/hosts/vamos/default.nix index c0b50d4..5279c5c 100644 --- a/hosts/vamos/default.nix +++ b/hosts/vamos/default.nix @@ -22,6 +22,7 @@ in { "${nixos}" "${nixos}/core/lanzaboote.nix" + "${nixos}/core/home-manager.nix" "${nixos}/hardware/fprintd.nix" "${nixos}/hardware/mcuxpresso.nix"