make home-manager optional
As the home-manager depends on the actual used nixpkgs version and is not always used, remove it from the base dependencies but use still use it implictely if a home-manager input exists.
This commit is contained in:
parent
d1d7485942
commit
e2bfb0949a
3 changed files with 7 additions and 29 deletions
|
|
@ -5,9 +5,13 @@
|
|||
modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${name}"; })) flake.lib.schema.base)
|
||||
++ [ { config.networking.hostName = name; } ]
|
||||
++ [ nixosModules.default ]
|
||||
++ [ inputs.home-manager.nixosModules.default ]
|
||||
++ [ { config.home-manager.sharedModules = [ hmModules.default ]; } ]
|
||||
++ [ { config.home-manager.extraSpecialArgs = { inherit flake namespace; }; } ]
|
||||
++ inputs.${nixpkgs}.lib.optional (inputs ? home-manager) {
|
||||
imports = [ inputs.home-manager.nixosModules.default ];
|
||||
config.home-manager = {
|
||||
sharedModules = [ hmModules.default ];
|
||||
extraSpecialArgs = { inherit flake namespace; };
|
||||
};
|
||||
}
|
||||
++ builtins.attrValues nixosUsers
|
||||
++ builtins.attrValues nixosGroups
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue