nix-darwin icon indicating copy to clipboard operation
nix-darwin copied to clipboard

User creation error on installation

Open herberteuler opened this issue 5 years ago • 6 comments

I had this issue during installation:

creating user nixbld9...
<main> attribute status: eDSRecordAlreadyExists
<dscl_cmd> DS Error: -14135 (eDSRecordAlreadyExists)

which was because user id 30009 was already taken by another user.

herberteuler avatar Oct 28 '19 07:10 herberteuler

I have the same issue, how can it be fixed?

maelp avatar Jul 15 '21 11:07 maelp

@maelp I simply manually created the user with another id. The issue was submitted as a reminder to create a patch for the user creation code. I may write a patch if I had time.

herberteuler avatar Jul 19 '21 08:07 herberteuler

You created it with the System Preferences app?

maelp avatar Jul 19 '21 08:07 maelp

No, by using the same command-line tool in the script but providing a manually filled id.

herberteuler avatar Jul 19 '21 08:07 herberteuler

I'm not sure which command-line tool it is, could you show me the command you are using?

maelp avatar Jul 19 '21 08:07 maelp

The code seems to have been changed a lot since the issue was submitted, but it looks like this is the code you are looking for: https://github.com/LnL7/nix-darwin/blob/master/modules/users/default.nix#L155

herberteuler avatar Jul 19 '21 08:07 herberteuler