mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-30 19:54:43 +00:00
users: change default description
to null
This commit is contained in:
parent
ac7932f9de
commit
11c777c719
2 changed files with 9 additions and 3 deletions
|
@ -168,7 +168,7 @@ in
|
||||||
else
|
else
|
||||||
if [ -z "$u" ]; then
|
if [ -z "$u" ]; then
|
||||||
echo "creating user ${v.name}..." >&2
|
echo "creating user ${v.name}..." >&2
|
||||||
sysadminctl -addUser ${lib.escapeShellArgs [ v.name "-UID" v.uid "-GID" v.gid "-fullName" v.description "-home" v.home "-shell" (shellPath v.shell) ]}
|
sysadminctl -addUser ${lib.escapeShellArgs ([ v.name "-UID" v.uid "-GID" v.gid ] ++ (lib.optionals (v.description != null) [ "-fullName" v.description ]) ++ [ "-home" v.home "-shell" (shellPath v.shell) ])}
|
||||||
dscl . -create ${dsclUser} IsHidden ${if v.isHidden then "1" else "0"}
|
dscl . -create ${dsclUser} IsHidden ${if v.isHidden then "1" else "0"}
|
||||||
${optionalString v.createHome "createhomedir -cu ${name}"}
|
${optionalString v.createHome "createhomedir -cu ${name}"}
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -14,12 +14,18 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
description = mkOption {
|
description = mkOption {
|
||||||
type = types.str;
|
type = types.nullOr types.nonEmptyStr;
|
||||||
default = "";
|
default = null;
|
||||||
example = "Alice Q. User";
|
example = "Alice Q. User";
|
||||||
description = ''
|
description = ''
|
||||||
A short description of the user account, typically the
|
A short description of the user account, typically the
|
||||||
user's full name.
|
user's full name.
|
||||||
|
|
||||||
|
This defaults to `null` which means, on creation, `sysadminctl`
|
||||||
|
will pick the description which is usually always {option}`name`.
|
||||||
|
|
||||||
|
Using an empty name is not supported and breaks macOS like
|
||||||
|
making the user not appear in Directory Utility.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue