diff --git a/system-config/users/default.nix b/system-config/users/default.nix index 8c4c18f..f8d2f83 100644 --- a/system-config/users/default.nix +++ b/system-config/users/default.nix @@ -63,15 +63,17 @@ config = { - users.users = builtins.mapAttrs (x: y: { - name = y.name; + users.users = builtins.mapAttrs (x: y: let + cfg = config.homeconfig.users.${x}; + in { + name = cfg.name; isNormalUser = true; - uid = y.uid; - hashedPasswordFile = lib.mkIf (y.hashedPasswordFile != null) y.hashedPasswordFile; - shell = y.shell; - extraGroups = y.extraGroups; - openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable y.sshKeys; - packages = with pkgs; lib.mkIf (user.home-manager.enable && user.home-manager.standalone) [ home-manager ]; + uid = cfg.uid; + hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile; + shell = cfg.shell; + extraGroups = cfg.extraGroups; + openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable cfg.sshKeys; + packages = with pkgs; lib.mkIf (cfg.home-manager.enable && cfg.home-manager.standalone) [ home-manager ]; }) config.sysconfig.users; programs.fuse.userAllowOther = true;