diff options
| author | Michael Hoang <enzime@users.noreply.github.com> | 2024-10-24 22:58:35 +1100 |
|---|---|---|
| committer | Michael Hoang <enzime@users.noreply.github.com> | 2024-10-27 21:26:19 +1100 |
| commit | c9af5c2d1394d1bc34f4722998bcd51714ccd68c (patch) | |
| tree | 2c257808b36d41bc5fc890398c37a079deacb058 /modules/users | |
| parent | 13816f682d1f604271651fec193961ee76610670 (diff) | |
users: update properties on known users
Diffstat (limited to 'modules/users')
| -rw-r--r-- | modules/users/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/users/default.nix b/modules/users/default.nix index b636d6f..f293f77 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -247,7 +247,10 @@ in dscl . -create ${dsclUser} IsHidden ${if v.isHidden then "1" else "0"} ${optionalString v.createHome "createhomedir -cu ${name}"} fi - # Always set the shell path, in case it was updated + + # Update properties on known users to keep them inline with configuration + dscl . -create ${dsclUser} PrimaryGroupID ${toString v.gid} + ${optionalString (v.description != null) "dscl . -create ${dsclUser} RealName ${lib.escapeShellArg v.description}"} dscl . -create ${dsclUser} UserShell ${lib.escapeShellArg (shellPath v.shell)} fi '') createdUsers} |
