ARG FUCKING MIT KPASSWD WAT
This commit is contained in:
+20
-10
@@ -86,7 +86,13 @@ let
|
||||
home-directory = mkOption {
|
||||
type = with types; nullOr str;
|
||||
description = "Default home directory for the given user.";
|
||||
default = null;
|
||||
default = null;
|
||||
};
|
||||
|
||||
k5login = mkOption {
|
||||
type = listOf str;
|
||||
description = "List of Kerberos principals that map to this user.";
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -151,7 +157,8 @@ in {
|
||||
|
||||
host-user-list = config.fudo.hosts."${local-host}".local-users;
|
||||
domain-user-list = config.fudo.domains."${local-domain}".local-users;
|
||||
local-users = getAttrs (host-user-list ++ domain-user-list) config.fudo.users;
|
||||
local-users =
|
||||
getAttrs (host-user-list ++ domain-user-list) config.fudo.users;
|
||||
|
||||
host-admin-list = config.fudo.hosts."${local-host}".local-admins;
|
||||
domain-admin-list = config.fudo.domains."${local-domain}".local-admins;
|
||||
@@ -161,12 +168,15 @@ in {
|
||||
host-group-list = config.fudo.hosts."${local-host}".local-groups;
|
||||
domain-group-list = config.fudo.domains."${local-domain}".local-groups;
|
||||
site-group-list = config.fudo.sites."${local-site}".local-groups;
|
||||
local-groups = getAttrs (host-group-list ++ domain-group-list ++ site-group-list) config.fudo.groups;
|
||||
local-groups =
|
||||
getAttrs (host-group-list ++ domain-group-list ++ site-group-list)
|
||||
config.fudo.groups;
|
||||
|
||||
in {
|
||||
fudo.auth.ldap-server = let
|
||||
ldapUsers = (filterAttrs
|
||||
(username: userOpts: userOpts.ldap-hashed-password != null)) config.fudo.users;
|
||||
(username: userOpts: userOpts.ldap-hashed-password != null))
|
||||
config.fudo.users;
|
||||
|
||||
in {
|
||||
users = mapAttrs (username: userOpts: {
|
||||
@@ -195,7 +205,10 @@ in {
|
||||
createHome = true;
|
||||
description = userOpts.common-name;
|
||||
group = userOpts.primary-group;
|
||||
home = if (userOpts.home-directory != null) then userOpts.home-directory else "/home/${userOpts.primary-group}/${username}";
|
||||
home = if (userOpts.home-directory != null) then
|
||||
userOpts.home-directory
|
||||
else
|
||||
"/home/${userOpts.primary-group}/${username}";
|
||||
hashedPassword = userOpts.login-hashed-passwd;
|
||||
openssh.authorizedKeys.keys = userOpts.ssh-authorized-keys;
|
||||
}) local-users;
|
||||
@@ -203,11 +216,8 @@ in {
|
||||
groups = (mapAttrs (groupname: groupOpts: {
|
||||
gid = groupOpts.gid;
|
||||
members = filterExistingUsers local-users groupOpts.members;
|
||||
}) local-groups) //
|
||||
{
|
||||
wheel = {
|
||||
members = local-admins;
|
||||
};
|
||||
}) local-groups) // {
|
||||
wheel = { members = local-admins; };
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user