flake: home-manager: refactor 'mkHome'

This will allow making a similar function for NixOS homes.
This commit is contained in:
Bruno BELANYI 2023-12-07 21:44:01 +00:00
parent 8241d0014a
commit e3b7b283d4

View file

@ -20,7 +20,7 @@ let
"${self}/modules/common"
];
mkHome = name: system: inputs.home-manager.lib.homeManagerConfiguration {
mkHomeCommon = mainModules: system: inputs.home-manager.lib.homeManagerConfiguration {
# Work-around for home-manager
# * not letting me set `lib` as an extraSpecialArgs
# * not respecting `nixpkgs.overlays` [1]
@ -33,9 +33,7 @@ let
];
};
modules = defaultModules ++ [
"${self}/hosts/homes/${name}"
];
modules = defaultModules ++ mainModules;
extraSpecialArgs = {
# Inject inputs to use them in global registry
@ -45,6 +43,7 @@ let
};
};
mkHome = name: mkHomeCommon [ "${self}/hosts/homes/${name}" ];
in
{
hosts.homes = {