philr has joined #nix-darwin
supersandro2000 has quit [Disconnected by services]
supersandro2000 has joined #nix-darwin
pinecamp has quit [Ping timeout: 245 seconds]
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nix-darwin
eraserhd3 has joined #nix-darwin
eraserhd2 has quit [Ping timeout: 256 seconds]
kgriffin has joined #nix-darwin
gtklocker has joined #nix-darwin
<gtklocker> sooo I have messed up permissions
<gtklocker> I enabled the nix daemon and I can see it's running
<gtklocker> permissions currently are
<gtklocker> then darwin-rebuild switch complains
<gtklocker> only the second option works but only for a single invocation of darwin-rebuild switch, then permissions on /nix/store get reset to root:nixbld
<gtklocker> any idea what may be going on?
<LnL> what would make that check more clear?
<LnL> you can't just transition between a single <> multi user install without fixing permissions of the store
<LnL> so unless you disable services.nix-daemon you shouldn't use that second case since that's exactly what the check is for
<gtklocker> sure I do want to fix permissions
<gtklocker> it's just that the first suggestion does not work
<gtklocker> and I do use the daemon
<gtklocker> so if I take the first suggestion and then rerun darwin-rebuild switch I get
<gtklocker> error: opening lock file '/nix/var/nix/db/big-lock': Permission denied
<gtklocker> also I'm kind of a noob on how the nix daemon works so maybe this is something obvious
<gtklocker> so in this scenario none of the suggestions really work
__monty__ has joined #nix-darwin
Chiliparrot has joined #nix-darwin
Chiliparrot has quit [Client Quit]
<LnL> hmm, that's weird
<LnL> the fact that the daemon is owned by root should trigger the client to talk to the daemon
<gtklocker> what do you mean the daemon is owned by root -- the process or what?
<LnL> err I mean the db
<gtklocker> I see
<gtklocker> well this doesn't look to be the case
<gtklocker> btw I'm running darwin-rebuild as user, that should be ok right?
<LnL> do you maybe have NIX_REMOTE set?
<gtklocker> no
<LnL> what does nix doctor output about the store?
<gtklocker> ha I didn't know this existed
<gtklocker> nix doctor also fails to acquire the lock
<gtklocker> same error
<LnL> weird
<LnL> so the daemon is running and /nix/var/nix/db is not writable for your local user?
<gtklocker> correct
<gtklocker> /nix/var/nix/db has root:wheel permissions as per the suggestion
<LnL> what if you run nix doctor --store daemon explicitly?
<gtklocker> alright turns out after a restart things do work, and NIX_REMOTE=daemon is set automatically
<gtklocker> so you should definitely reboot after enabling the nix daemon
<gtklocker> :)
<LnL> hmm, that shouldn't be be required tho
<LnL> so everything works now, but I suspect nix doctor --store auto would still fail
<gtklocker> correct
<LnL> this is what the permissions look like for me https://gist.github.com/LnL7/694755d4910d5e9d5f00f99d2e8a43f4
<gtklocker> ok so permissions for the parent is what differs for me
<gtklocker> but it probably shouldn't be a problem if nix daemon has root
<LnL> yeah, but that's not what is broken
<gtklocker> so wait if I unset NIX_REMOTE you would still expect this to pick up on the daemon automatically?
<LnL> it's the client that tries to figure out if it should operate on the store directly or talk to the daemon because it doesn't have enough permissions
<gtklocker> and not try to do a local lock?
<gtklocker> I see
<LnL> you can specify explicitly what it should do (with NIX_REMOTE or --store) but by default it should just "figure it out"
<LnL> I added that check to help but seems like that doesn't entirely match the condition that nix uses itself
<gtklocker> yeah
<gtklocker> btw for the whole of /nix would root:wheel be typical?
<LnL> I thought it was the permissions of /nix/var/nix/db/db.sqlite specifically
<LnL> yeah, but there are a few exceptions
<LnL> like /nix/var/nix/profiles/per-user /nix/var/nix/gcroots/per-user
<gtklocker> I see
philr has quit [Ping timeout: 258 seconds]
Chiliparrot has joined #nix-darwin
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
zimbatm has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
zimbatm has joined #nix-darwin
Chiliparrot has joined #nix-darwin
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
eraserhd has joined #nix-darwin
eraserhd3 has quit [Ping timeout: 240 seconds]
hedgie_ has quit []
hedgie has joined #nix-darwin
hedgie_ has joined #nix-darwin
hedgie has quit [Ping timeout: 264 seconds]
hedgie has joined #nix-darwin
__monty__ has quit [Quit: leaving]
hedgie_ has quit [Ping timeout: 264 seconds]
philr has joined #nix-darwin