recursion
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
userType = types.submodule ({ name, ... }: {
|
||||
options = with lib; {
|
||||
username = mkOption {
|
||||
usrname = mkOption {
|
||||
type = with types; passwdEntry str;
|
||||
default = name;
|
||||
};
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
config = {
|
||||
users.users = builtins.mapAttrs (name: user: {
|
||||
name = user.username;
|
||||
name = user.usrname;
|
||||
isNormalUser = true;
|
||||
uid = user.uid;
|
||||
hashedPasswordFile = lib.mkIf (user.hashedPasswordFile != null) user.hashedPasswordFile;
|
||||
@@ -88,11 +88,11 @@
|
||||
{
|
||||
homeconfig = {
|
||||
host = config.sysconfig.host;
|
||||
username = user.username;
|
||||
name = user.usrname;
|
||||
graphical = config.sysconfig.graphical;
|
||||
};
|
||||
}
|
||||
] ++ (if inputs ? ${user.username} then [ (inputs.${user.username} { config = config.home-manager.users.${user.username}; inherit inputs; }) ] else [])
|
||||
] ++ (if inputs ? ${user.usrname} then [ (inputs.${user.usrname} { config = config.home-manager.users.${user.usrname}; inherit lib pkgs inputs; }) ] else [])
|
||||
++ user.home-manager.extraModules)))
|
||||
(builtins.removeAttrs
|
||||
config.sysconfig.users
|
||||
|
||||
Reference in New Issue
Block a user