00:10
johnw has quit [Remote host closed the connection]
03:30
<
clever >
LnL: what can go wrong if `darwin-rebuild switch` is ran as root the first time you switch?
03:31
johnny101 has joined #nix-darwin
08:15
philr has joined #nix-darwin
08:44
__monty__ has joined #nix-darwin
09:36
Chiliparrot has joined #nix-darwin
09:51
<
LnL >
clever: not much I think, it only uses root for system stuff because 1. nix single-user install 2. things like defaults write are only apply for the login user
10:48
philr has quit [Ping timeout: 260 seconds]
10:54
<
evelyn >
that issue on github has really got out of hand
10:55
<
evelyn >
it is so big that people are complaining that things don't work that are documented further up
10:55
<
evelyn >
e.g. the last comment 'Apple offers a new option for writable / volumes in Catalina: man synthetic.conf'
10:56
<
LnL >
yeah, github issues doesn't work for something like this
10:56
<
LnL >
and it's not really the right place IMHO
10:57
<
evelyn >
I think the issue should be locked
10:57
<
evelyn >
it's just confusing people
10:57
<
LnL >
the issue is about readonly / and the answer is synthetic.conf the rest is unrelated discussion or another issue
12:44
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
12:52
philr has joined #nix-darwin
13:20
Chiliparrot has joined #nix-darwin
13:43
eraserhd has quit [Ping timeout: 260 seconds]
13:45
eraserhd has joined #nix-darwin
13:48
Chiliparrot has quit [Ping timeout: 240 seconds]
13:50
Chiliparrot has joined #nix-darwin
14:01
<
clever >
LnL: i worked around the problem by running `darwin-rebuild build` as root, then `darwin-rebuild switch` as the right user
14:05
<
LnL >
yeah that should be finie
14:09
<
clever >
creating user hercules-ci-agent...
14:09
<
clever >
dscl_cmd> DS Error: -14135 (eDSRecordAlreadyExists)
14:09
<
clever >
main> attribute status: eDSRecordAlreadyExists
14:09
<
clever >
LnL: ive also got this error causing darwin-rebuild to crash hard
14:10
<
LnL >
what does this return?
14:10
<
LnL >
dscl . -read '/Users/hercules-ci-agent' UniqueID
14:13
<
clever >
<dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
14:13
<
clever >
LnL: if darwin-rebuild fails hard, then my ssh keys arent allowed into the machine, so i cant see what happens in that case
14:13
<
clever >
LnL: if i disable hercules-ci-agent, then it obviously doesnt exist
14:13
<
LnL >
what about id hercules-ci-agent?
14:14
<
clever >
id: hercules-ci-agent: no such user
14:14
<
clever >
we are using zfs snapshots to undo all state to the mac on every shutdown
14:15
<
LnL >
why is it failing then...
14:15
<
clever >
thats what makes no sense
14:15
<
LnL >
x=$(dscl . -read '/Users/hercules-ci-agent' UniqueID)
14:16
<
clever >
when hercules is disabled, it prints an empty string
14:18
<
LnL >
nevermind, that's not a problem
14:21
<
LnL >
unless the read fails for some reason?
14:22
<
clever >
LnL: i cant run any tests after the failure happens, because the failure prevents ssh keys from being configured
14:24
<
LnL >
this might help for debugging
14:24
<
LnL >
system.activationScripts.preActivation.text = '' dscl . -read /Users/hercules-ci-agent || true '';
14:25
<
LnL >
the outptut is redirected during normal execution
14:26
<
LnL >
I'd expect this to fail once with NotFound but then not succeed the second time
14:26
<
clever >
ah, that also sounds like a good place for `set -x`
14:27
<
LnL >
actually... looking at the order this might be the first place where permissions are required
14:29
<
LnL >
or more specifically the root check above
14:30
<
LnL >
are you running root -> ( switch; user -> switch ) or root -> switch; user -> switch
14:30
<
clever >
looks like activate-user runs as the user, and activate runs as root, seems normal
14:30
<
clever >
its running as `nixos`
14:30
<
clever >
134 sudo -i -H -u nixos -- darwin-rebuild switch
14:31
<
LnL >
alright, that looks fine
14:33
<
clever >
deploying...
14:42
<
clever >
/Volumes/CONFIG/apply.sh::::132 darwin-rebuild build -I darwin-config=/Users/nixos/.nixpkgs/darwin-configuration.nix
14:42
<
clever >
building the system configuration...
14:42
<
clever >
LnL: it doesnt seem to be fully obeying the nix.conf file...
14:42
<
LnL >
before configuration?
14:42
<
clever >
there is a second nix.conf, made with a bash heredoc
14:43
<
clever >
which is part of why its a 2 step build + switch
14:43
<
clever >
so i can delete that one before switch gets upset about it being in the way
14:43
<
LnL >
so that's the second activation?
14:44
<
clever >
the download is happening on the build step, when the custom nix.conf is still in place
14:44
<
clever >
once that build finishes, i'll see the hercules error
14:45
<
LnL >
did you reload the daemon? it only loads on start and nix-darwin doesn't know things changed yet
14:45
<
clever >
75 cat <<EOF > /etc/nix/nix.conf
14:45
<
clever >
101 sudo launchctl kickstart system/org.nixos.nix-daemon
14:45
<
LnL >
add -k to that
14:45
<
clever >
after the kickstart cmd?
14:46
<
LnL >
-k If the service is already running, kill the running instance before restarting the service.
14:46
<
LnL >
sudo launchctl kickstart -k system/org.nixos.nix-daemon
14:46
<
LnL >
don't know if the order is important
14:46
<
clever >
i dont think thats needed...
14:47
<
clever >
the install of nix-darwin itself, prior to the `darwin-rebuild build` was obeying nix.conf
14:47
<
clever >
97 installer=$(nix-build @nixDarwinUrl@ -A installer --no-out-link)
14:48
<
clever >
oh, thats before the kickstart!
14:48
<
clever >
weird, i would expect that to have not worked
15:01
<
clever >
LnL: pastebinning...
15:02
<
clever >
angerman: you where right!
15:02
<
angerman >
clever: what?
15:02
<
clever >
LnL: why is it assigning the same uid to both users?
15:02
<
clever >
angerman: buildkite and hercules are the same uid!
15:03
<
angerman >
clever: ahh! Good(?) to know!
15:04
* LnL
should add a check for that
15:04
<
clever >
LnL: nothing is setting the uid for buildkite, so how did it wind up with 532?
15:05
<
LnL >
line 3 implies it's set somewhere
15:05
<
clever >
76 users.users.buildkite-agent = {
15:05
<
clever >
77 uid = 532;
15:06
<
clever >
then why is hercules using the same uid?...
15:08
<
clever >
theres the problem!
15:10
<
clever >
i'll make it 727 now
15:45
<
LnL >
clever: 3d50598ae007b175924344992cfcd41366e1bf57
16:24
hedgie has joined #nix-darwin
17:07
philr has quit [Ping timeout: 268 seconds]
17:13
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
17:15
johnw has joined #nix-darwin
17:19
ryanartecona has joined #nix-darwin
17:31
eraserhd has quit [Ping timeout: 260 seconds]
17:34
eraserhd has joined #nix-darwin
20:23
ryanartecona has quit [Quit: ryanartecona]
20:34
hedgie has quit [Read error: Connection reset by peer]
20:34
hedgie has joined #nix-darwin
20:43
ryanartecona has joined #nix-darwin
20:54
Chiliparrot has joined #nix-darwin
20:54
ryanartecona has quit [Quit: ryanartecona]
21:01
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
21:06
hedgie has quit [Ping timeout: 265 seconds]
21:06
hedgie has joined #nix-darwin
22:26
philr has joined #nix-darwin
22:27
ryanartecona has joined #nix-darwin
22:39
__monty__ has quit [Quit: leaving]