diff options
| author | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2019-02-20 23:48:58 -0800 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2019-02-24 22:06:37 +0100 |
| commit | 303c5fbb0060587bcab4b2f25ac588de49c725ec (patch) | |
| tree | e6513d3e2ee31518c7915834c5081fcbdf2b9ab0 /modules | |
| parent | 6c6c8f21645f23c75bc25417c4fe6d5fb02eabd4 (diff) | |
users: create the home-directory for a new user
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/users/default.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/users/default.nix b/modules/users/default.nix index 5e75694..c3ef463 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -139,6 +139,8 @@ in dscl . -create '/Users/${v.name}' RealName '${v.description}' dscl . -create '/Users/${v.name}' NFSHomeDirectory '${v.home}' dscl . -create '/Users/${v.name}' UserShell '${v.shell}' + mkdir -p '${v.home}' + chown '${toString v.uid}:${toString v.gid}' '${v.home}' else if [ "$u" -ne ${toString v.uid} ]; then echo "[1;31mwarning: existing user '${v.name}' has unexpected uid $u, skipping...[0m" >&2 |
