jtojnar has quit [Remote host closed the connection]
jtojnar has joined #nix-darwin
jtojnar has quit [Remote host closed the connection]
nD5Xjz_ has joined #nix-darwin
nD5Xjz has quit [Ping timeout: 246 seconds]
nD5Xjz_ has quit [Read error: Connection timed out]
nD5Xjz has joined #nix-darwin
myskran has quit [Ping timeout: 244 seconds]
nD5Xjz has quit [Ping timeout: 255 seconds]
nD5Xjz has joined #nix-darwin
<thefloweringash>
darwin experts: I'm seeing different values for `getlogin` inside a nix build environment. One one mac it's "root", on another it's "nixbld1", and on another it's "_spotlight" (!!). Does this ring any bells?
<LnL>
root!?
<LnL>
can you run dscl . -read /Groups/nixbld GroupMembership on both
<thefloweringash>
They both report: `GroupMembership: nixbld1 nixbld2 nixbld3 nixbld4 nixbld5 nixbld6 nixbld7 nixbld8 nixbld9 nixbld10`
<LnL>
hmm, what about nix show-config | grep build-users-group
<thefloweringash>
`build-users-group = nixbld` x3
<thefloweringash>
They're all controlled by nix-darwin, with config from the same repo, with minor variations, and different nixpkgs versions. I'm assuming it's not misconfiguration, but then I don't have any better guesses.
<LnL>
what does that snippet do exactly? I get my local user even tho the build user is correct
<LnL>
ie it's running as one of the unprivileged nixbld users
<thefloweringash>
it's calling posix "getlogin()" from my favorite high level language
<LnL>
yeah but "is inherited by all processes descended from the login shell", the nix-daemon (root) is what starts the build process so I don't understand how my user gets there
<thefloweringash>
I really don't understand how `_spotlight` is getting there either!
<LnL>
if it returns the last user logged in that would explain both