feat(configurations): pass in host manifest config to home-manager
This commit is contained in:
parent
2710c71820
commit
79c7e495c8
1 changed files with 6 additions and 3 deletions
|
@ -10,10 +10,13 @@ let
|
||||||
inherit (lib.attrsets) mapAttrs;
|
inherit (lib.attrsets) mapAttrs;
|
||||||
inherit (cfg.lib.modules) forAllUsers';
|
inherit (cfg.lib.modules) forAllUsers';
|
||||||
cfg = config.flake;
|
cfg = config.flake;
|
||||||
globalCfg = name: {
|
globalCfg = name: hostConfig: {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs.hostName = name;
|
extraSpecialArgs = {
|
||||||
|
inherit hostConfig;
|
||||||
|
hostName = name;
|
||||||
|
};
|
||||||
sharedModules = [ cfg.modules.homeManager.default ];
|
sharedModules = [ cfg.modules.homeManager.default ];
|
||||||
users = forAllUsers' (name: _: cfg.modules.homeManager.${name});
|
users = forAllUsers' (name: _: cfg.modules.homeManager.${name});
|
||||||
};
|
};
|
||||||
|
@ -28,7 +31,7 @@ let
|
||||||
modules = [
|
modules = [
|
||||||
cfg.modules.nixos.default
|
cfg.modules.nixos.default
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{ home-manager = globalCfg name; }
|
{ home-manager = globalCfg name value; }
|
||||||
(value.extraCfg or { })
|
(value.extraCfg or { })
|
||||||
] ++ optional value.graphical cfg.modules.nixos.graphical;
|
] ++ optional value.graphical cfg.modules.nixos.graphical;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue