WIP: installer: allow overriding nix user UID on darwin too#6466
WIP: installer: allow overriding nix user UID on darwin too#6466bjornfor wants to merge 1 commit into
Conversation
Similar to f4d57aa ("installer: allow overriding nix user GID and UIDs"), but for darwin. (There's no corresponding *_GID in this script though, so skipping that.) Ref NixOS#6153.
|
I don't have enough time to look, but I think it may not be this simple. Iirc the variable is already set in the core multiuser script, so I think this would start inheriting that default? |
You're right, landing this PR now would mean effectively changing the darwin default UID from 301 to 30001. |
| # create by default; set 0 to DIY, use a symlink, etc. | ||
| readonly NIX_VOLUME_CREATE=${NIX_VOLUME_CREATE:-1} # now default | ||
| NIX_FIRST_BUILD_UID="301" | ||
| NIX_FIRST_BUILD_UID="${NIX_FIRST_BUILD_UID:-301}" |
There was a problem hiding this comment.
We can use a different var name to avoid it being overridden by the parent script.
| NIX_FIRST_BUILD_UID="${NIX_FIRST_BUILD_UID:-301}" | |
| NIX_FIRST_BUILD_UID="${NIX_FIRST_BUILD_UID_DARWIN:-301}" |
There was a problem hiding this comment.
While it is the simpler change, I think the potential-confusion would be lower if we moved the value-setting out into the ~speciated scripts (i.e., require the platform install scripts to be opinionated on this UID instead of having a default-that-isn't-a-default?)
There was a problem hiding this comment.
I'm not sure what you mean.
There was a problem hiding this comment.
Something like:
- replace the default declaration up in the main multiuser script with a comment that says that the speciated ~variant (
-darwin-,-linux-) scripts are responsible for setting it - move the default declaration out into the
-linux-script - do roughly what this current PR does for the
-darwin-script
There was a problem hiding this comment.
gotcha. yeah, sounds good.
|
I'd really like to get some version of this in. It's been causing me headaches. |
|
@bacchanalia: if you can, please make a PR. |
|
@bjornfor sure. I just wasn't sure if you were interested in reviving this one or not. |
because there are often already users in the 300 range and it's painful to work around. revives NixOS#6466
|
Superseded by #9639. |
Similar to f4d57aa ("installer: allow overriding nix user GID and
UIDs"), but for darwin.
(There's no corresponding *_GID in this script though, so skipping
that.)
Ref #6153.