configurations: use home-manager module by default
This commit is contained in:
parent
bc40af000f
commit
cdc41c3934
|
@ -60,7 +60,6 @@
|
|||
libGLU.dev
|
||||
vulkan-loader.dev
|
||||
|
||||
fpc
|
||||
jdk
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
let
|
||||
profiles = import ../profile;
|
||||
|
||||
makeSystem = { host, arch ? "x86_64-linux", extraModules ? [ ], stable ? true }:
|
||||
makeSystem = { host, arch ? "x86_64-linux", extraModules ? [ ], stable ? true, hmAsModule ? true, hmUsers ? [ "materus" ] }:
|
||||
let
|
||||
nixosSystem = if stable then inputs.nixpkgs-stable.lib.nixosSystem else inputs.nixpkgs.lib.nixosSystem;
|
||||
hm = if stable then inputs.configInputs-stable.home-manager else inputs.configInputs.home-manager;
|
||||
|
@ -12,6 +12,7 @@ let
|
|||
inherit materusFlake;
|
||||
inherit host;
|
||||
inherit hm;
|
||||
inherit hmAsModule;
|
||||
nixerus = if stable then inputs.configInputs-stable.nixerus else inputs.configInputs.nixerus;
|
||||
configInputs = if stable then inputs.configInputs-stable else inputs.configInputs;
|
||||
path = materusFlake.selfPath;
|
||||
|
@ -27,6 +28,27 @@ let
|
|||
inputs.private.systemModule
|
||||
profiles.osProfile
|
||||
materusCfg.configInputs.sops-nix.nixosModules.sops
|
||||
(if hmAsModule then hm.nixosModules.home-manager else { })
|
||||
(if hmAsModule then
|
||||
{
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users = (builtins.foldl' (a: b: a // b) { } (builtins.map
|
||||
(user: {
|
||||
${user} = ({ ... }:
|
||||
{
|
||||
imports = [
|
||||
(materusFlake.selfPath + "/configurations/shared/home/${user}")
|
||||
(materusFlake.selfPath + "/configurations/host/${host}/home/${user}")
|
||||
profiles.homeProfile
|
||||
];
|
||||
});
|
||||
})
|
||||
hmUsers));
|
||||
home-manager.extraSpecialArgs = { materusCfg = materusCfg // { isHm = true; }; };
|
||||
} else { })
|
||||
|
||||
] ++ extraModules;
|
||||
}) // { inherit materusCfg; };
|
||||
in
|
||||
|
@ -34,7 +56,7 @@ in
|
|||
materusPC = makeSystem { host = "materusPC"; stable = false; };
|
||||
flamaster = makeSystem { host = "flamaster"; stable = true; };
|
||||
valkyrie = makeSystem { host = "valkyrie"; stable = true; };
|
||||
waffentrager = makeSystem { host = "waffentrager"; stable = false; arch = "aarch64-linux"; extraModules = [ ]; };
|
||||
waffentrager = makeSystem { host = "waffentrager"; stable = true; arch = "aarch64-linux"; };
|
||||
|
||||
Old-materusPC = makeSystem { host = "Old-materusPC"; stable = false; };
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@ let
|
|||
value = let host = builtins.elemAt hosts i; in
|
||||
materusFlake.nixosConfigurations.${host}.materusCfg.hm.lib.homeManagerConfiguration {
|
||||
pkgs = materusFlake.nixosConfigurations.${host}.pkgs;
|
||||
extraSpecialArgs = { materusCfg = materusFlake.nixosConfigurations.${host}.materusCfg // { homePath = materusFlake.selfPath + "/configurations/home/${username}"; isHm = true; }; };
|
||||
extraSpecialArgs = { materusCfg = materusFlake.nixosConfigurations.${host}.materusCfg // { isHm = true; }; };
|
||||
modules = [
|
||||
./${username}
|
||||
../host/${host}/extraHome.nix
|
||||
(materusFlake.selfPath + "/configurations/shared/home/${username}")
|
||||
(materusFlake.selfPath + "/configurations/host/${host}/home/${username}")
|
||||
profiles.homeProfile
|
||||
inputs.private.homeModule
|
||||
materusFlake.nixosConfigurations.${host}.materusCfg.configInputs.sops-nix.homeManagerModules.sops
|
||||
|
@ -36,10 +36,10 @@ let
|
|||
inherit materusFlake;
|
||||
host = "Generic";
|
||||
hm = inputs.configInputs.home-manager;
|
||||
hmAsModule = false;
|
||||
nixerus = inputs.configInputs.nixerus;
|
||||
configInputs = inputs.configInputs;
|
||||
path = materusFlake.selfPath;
|
||||
homePath = materusFlake.selfPath + "/configurations/home/${username}";
|
||||
isHm = true;
|
||||
};
|
||||
in
|
|
@ -56,7 +56,7 @@
|
|||
outputs = inputs @ { self, nixpkgs, home-manager, nur, ... }:
|
||||
rec {
|
||||
nixosConfigurations = import ./configurations/host { inherit inputs; materusFlake = self; };
|
||||
homeConfigurations = import ./configurations/home { inherit inputs; materusFlake = self; };
|
||||
homeConfigurations = import ./configurations/shared/home { inherit inputs; materusFlake = self; };
|
||||
selfPath = self;
|
||||
decrypted = builtins.pathExists (selfPath + "/decrypted");
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue