diff options
Diffstat (limited to 'sys/core/home-manager.nix')
| -rw-r--r-- | sys/core/home-manager.nix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/core/home-manager.nix b/sys/core/home-manager.nix index df9a518..7bc4b18 100644 --- a/sys/core/home-manager.nix +++ b/sys/core/home-manager.nix @@ -1,34 +1,36 @@ -{ inputs, config, lib,... }: +{ inputs, config, lib, username, ... }: let - cfg = config.szpont.sys.core.home-manager; + cfg = config.sys.core.home-manager; in { imports = [ inputs.home-manager.nixosModules.home-manager ]; - options.szpont.sys.core.home-manager = { + + options.sys.core.home-manager = { enable = lib.mkEnableOption "home Manager configuration"; users = lib.mkOption { default = {}; - description = "attribute set of users and their home-manager configurations"; + description = "Attribute set of users and their home-manager configurations"; type = lib.types.attrsOf (lib.types.submodule { options = { path = lib.mkOption { type = lib.types.path; - description = "path to the user's home.nix file"; + description = "Path to the user's home.nix file"; }; }; }); }; }; - config = lib.mkIf cfg.enable { home-manager = { - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { inherit inputs username; }; useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "bak"; - users = lib.mapAttrs (name: user: import user.path) cfg.users; + users = lib.mapAttrs (name: userCfg: { + imports = [ userCfg.path ]; + }) cfg.users; }; }; } |
