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 87ba726b18
commit 31effae175

View file

@ -25,12 +25,10 @@ let
"${self}/modules/common"
];
mkHome = name: system: inputs.home-manager.lib.homeManagerConfiguration {
mkHomeCommon = mainModules: system: inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${system};
modules = defaultModules ++ [
"${self}/hosts/homes/${name}"
];
modules = defaultModules ++ mainModules;
# Use my extended lib in NixOS configuration
inherit (self) lib;
@ -41,6 +39,7 @@ let
};
};
mkHome = name: mkHomeCommon [ "${self}/hosts/homes/${name}" ];
in
{
hosts.homes = {