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 4fdc5f7c37
commit 09f41eaf88

View file

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