1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

users: create the home-directory for a new user

This commit is contained in:
Wael M. Nasreddine 2019-02-20 23:48:58 -08:00 committed by Daiderd Jordan
parent 6c6c8f2164
commit 303c5fbb00
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -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 "warning: existing user '${v.name}' has unexpected uid $u, skipping..." >&2