mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-16 21:38:21 +00:00
Merge pull request #1136 from Enzime/push-znntomztlvku
users: don't check home directory is correct before creating user
This commit is contained in:
commit
e56d80b283
1 changed files with 17 additions and 16 deletions
|
@ -158,9 +158,9 @@ in
|
||||||
if ! [[ -n "$u" && "$u" -ne "${toString v.uid}" ]]; then
|
if ! [[ -n "$u" && "$u" -ne "${toString v.uid}" ]]; then
|
||||||
if [ -z "$u" ]; then
|
if [ -z "$u" ]; then
|
||||||
ensurePerms ${name} create
|
ensurePerms ${name} create
|
||||||
fi
|
|
||||||
|
|
||||||
${optionalString (v.home != null && v.name != "root") ''
|
${optionalString (v.home != null && v.name != "root") ''
|
||||||
|
else
|
||||||
homeDirectory=$(dscl . -read ${dsclUser} NFSHomeDirectory)
|
homeDirectory=$(dscl . -read ${dsclUser} NFSHomeDirectory)
|
||||||
homeDirectory=''${homeDirectory#NFSHomeDirectory: }
|
homeDirectory=''${homeDirectory#NFSHomeDirectory: }
|
||||||
if [[ ${lib.escapeShellArg v.home} != "$homeDirectory" ]]; then
|
if [[ ${lib.escapeShellArg v.home} != "$homeDirectory" ]]; then
|
||||||
|
@ -176,6 +176,7 @@ in
|
||||||
fi
|
fi
|
||||||
''}
|
''}
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
'') createdUsers}
|
'') createdUsers}
|
||||||
|
|
||||||
${concatMapStringsSep "\n" (v: let
|
${concatMapStringsSep "\n" (v: let
|
||||||
|
|
Loading…
Add table
Reference in a new issue