<puffnfresh> LnL: I have a "script://" store, which is working pretty well with your patch
<puffnfresh> gonna write a LinuxKit store using it :)
<puffnfresh> thanks shlevy for your plugin stuff too
<puffnfresh> worst case I can make a "LinuxKit" plugin!!
<shlevy> puffnfresh: ooh, what patch is this? What would script:// look like?
<puffnfresh> shlevy: I need LnL 's patch to fix --builder https://github.com/NixOS/nix/pull/1713
<shlevy> Aaah gotcha
<puffnfresh> script:// is just like the SSH store, but instead of ssh, it runs a script
<shlevy> Aaah cool
<puffnfresh> should be able to implement the SSH store in terms of the script store
<puffnfresh> I'll give that a go too
<puffnfresh> does the script store seem like a reasonable thing? shlevy
<shlevy> Depends on what it looks like, but one of the nice things for plugins is that we can validate out of tree first now :)
<puffnfresh> yeah, I'll implement a few scripts and open an issue about it :)
<pikajude> LnL are you thinking of making darwin-rebuild use the new "nix build" command
<shlevy> puffnfresh: Hmm I think I actually have need for your script:// idea :D
<shlevy> puffnfresh: Is it available anywhere?
chrisbarrett has joined #nix-darwin
<puffnfresh> shlevy: will push in a few minutes
<shlevy> Nice
<shlevy> Thanks!
<puffnfresh> there are 2 calls to a script
<puffnfresh> "script:///tmp/example" will call "/tmp/example master $tmpdir" then call "/tmp/example start $tmpdir"
<shlevy> Nice!!! Taking a look now
<puffnfresh> master is like how the SSH store can start a multiplexed SSH connection (currently broken due to 1875)
<puffnfresh> I'm going to use "/tmp/example master $tmpdir" to start up a LinuxKit VM
<puffnfresh> oh awesome thanks!
<puffnfresh> was looking for something like that
<shlevy> Obviously you don't need libnixexpr
<shlevy> Oh man on-demand distributed builds
<shlevy> fantastic
<puffnfresh> yeah, Nix will auto start a VM then hopefully shut it down when done
<puffnfresh> the script:// thing is pretty much the SSH code, just copy/pasted and SSH specific stuff removed
<shlevy> OK I'm thinking this should definitely be in by 2.1 if not 2.0... modulo bikeshedding
<puffnfresh> I'm gonna write the LinuxKit script then make an installer for /etc/nix/nix.conf
<shlevy> Yeah, at the very least we can extract a base class out of the SSH code by 2.0 if you see a clean way to do that
<puffnfresh> give it to my team to try out
jrolfs has joined #nix-darwin
chrisbarrett has quit [Quit: chrisbarrett]
chrisbarrett has joined #nix-darwin
philr has joined #nix-darwin
chrisbarrett has quit [Quit: chrisbarrett]
<johnw> hi puffnfresh!
<puffnfresh> hey johnw !!
<puffnfresh> how's it going??
<johnw> and hi shlevy!
<johnw> going well
<johnw> about to upgrade to High Sierra tomorrow
<shlevy> Oh no :o
<shlevy> Hi johnw :)
<johnw> haha
<johnw> should i not?
<shlevy> Just been a lot of pain so far
<johnw> like what?
<shlevy> Install failures, system freezes, fun vulns... :)
jrolfs has quit [Ping timeout: 276 seconds]
jrolfs has joined #nix-darwin
chrisbarrett has joined #nix-darwin
chrisbarrett has quit [Quit: chrisbarrett]
jrolfs has quit [Ping timeout: 240 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 256 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Remote host closed the connection]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Remote host closed the connection]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 264 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 268 seconds]
<LnL> pikajude: yes, but it doesn’t show the store path and I didn’t want to use the result symlink
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 240 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 268 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 252 seconds]
philr has quit [Ping timeout: 256 seconds]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 240 seconds]
jrolfs has joined #nix-darwin
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
mightybyte has joined #nix-darwin
<mightybyte> I just upgraded to High Sierra and now I'm getting this when I try to install nix
<mightybyte> "error: the build users group ‘nixbld’ has no members"
<mightybyte> Any suggestions?
<LnL> what's the output of dscl . -read /Groups/nixbld GroupMembership
<mightybyte> No such key: GroupMembership
<LnL> hmm well that's not good
<LnL> does the group exist?
<LnL> dscl . -read /Groups/nixbld
<mightybyte> Yeah
<mightybyte> PrimaryGroupID: 30000
<mightybyte> RealName:
<mightybyte> Nix build group for nix-daemon
<LnL> and the users, like dscl . -read /Users/nixbld1
<mightybyte> Yeah
<LnL> so the upgrade only removed the membership, weird
<mightybyte> I deleted everything before running the installer
<mightybyte> Although some of this group stuff might have been preserved.
<LnL> so depending on how many users you have, run something like this
<LnL> sudo dscl . -create '/Groups/nixbld' GroupMembership 'nixbld1' 'nixbld2' 'nixbld3' 'nixbld4' 'nixbld5' 'nixbld6' 'nixbld7' 'nixbld8' 'nixbld9' 'nixbld10'
<mightybyte> Ok, that ran and gave no output
<mightybyte> Let me try the installer again.
<LnL> hmm, I just had a crazy idea
<LnL> now that nix-darwin can bootstrap itself, I think I could build a tarball installer from that
<LnL> then you can install without going through the multi-user installer first
<mightybyte> Ok, now the installer appeared to succeed
<mightybyte> But I get this
<mightybyte> $ nix-shell -p nix-info --run "nix-info -m"
<mightybyte> error: Nix database directory ‘/nix/var/nix/db’ is not writable: Permission denied
<LnL> did you start a new shell?
<mightybyte> Yep
<LnL> echo $NIX_REMOTE
<mightybyte> Returns a blank line
<LnL> it should say daemon
<mightybyte> I tried installing last night and got to a point where the installer said it succeeded and then I got this same problem.
<LnL> so the nix-daemon profile isn't getting loaded for some reason
<LnL> but nix is in your path
<LnL> oh hold on
<LnL> test ! -w /nix/var/nix/db && echo "daemon"
<mightybyte> That returns "daemon"
<LnL> does it work if you source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
<LnL> in your current shell
<mightybyte> No
<LnL> not sure why it's not setting that then
<LnL> you could try and debug with bash -x nix-daemon.sh
<mightybyte> Just run that now or sometime during the install process?
<LnL> no need to reinstall, that environment variable is probably the only issue
<LnL> you could check NIX_REMOTE=daemon nix-shell -p nix-info --run nix-info
<mightybyte> Ahh yes, that seems to work.
<LnL> yeah so the install was fine, just something weird with the condition for that variable
<mightybyte> Hmmm, what to do...
<mightybyte> Where does that variable get set?
<LnL> by nix-daemon.sh take a look in there
<LnL> there's a condition that checks if the db is writable and sets if if that's not the case
<mightybyte> Where's that script? I'm not seeing it.
<LnL> in /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
<mightybyte> Bizarre
<mightybyte> Running that with bash -x gives output with these two lines
<mightybyte> + export NIX_REMOTE=daemon
<mightybyte> + NIX_REMOTE=daemon
<LnL> eh
<mightybyte> But somehow it's not getting preserved
<mightybyte> ;(
<LnL> well with bash .... it wouldn't but with source ... it should
<mightybyte> Ahh, right
<mightybyte> Is there some mechanism for debugging source?
<LnL> set -x and then source
<mightybyte> So this test must be failing
<mightybyte> [ "$USER" != root -o ! -w /nix/var/nix/db ];
<LnL> yeah, maybe I messed up the check I sent you earlier?
<LnL> the db should be owned and only writable by root
<mightybyte> drwxr-xr-x 6 root wheel 192B Feb 18 11:14 /nix/var/nix/db
<mightybyte> Maybe the -w fails since it's not writable by my user?
<LnL> that looks normal, it's ! -w
<mightybyte> Ahh
<mightybyte> LnL: I put this line between almost every line of nix-daemon.sh
<mightybyte> echo NIX_REMOTE = $NIX_REMOTE
<mightybyte> And when I open a new shell I see this
<mightybyte> NIX_REMOTE =
<mightybyte> NIX_REMOTE = daemon
<mightybyte> ...followed by a bunch more "NIX_REMOTE = daemon" lines
<mightybyte> Then at my prompt
<mightybyte> "echo $NIX_REMOTE" prints nothing.
<LnL> well, I'm very confused
<mightybyte> Yeah, me too
<LnL> you can export it in your ~/.bashrc or wherever you put your other stuff like that
<LnL> unless that doesn't work either, then I'm totally lost
<mightybyte> LnL: Doh!
<mightybyte> I was unsetting NIX_REMOTE in my .zshrc file
<mightybyte> And sourcing nix-daemon.sh again didn't work because of the first line that checks whether it has been run before.
<LnL> :D
<mightybyte> Sorry for the noise
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
jrolfs has quit [Ping timeout: 252 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 256 seconds]
jrolfs has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
cransom has quit [Quit: WeeChat 2.0]
cransom has joined #nix-darwin
zzamboni has joined #nix-darwin
jrolfs has quit [Ping timeout: 268 seconds]
philr has joined #nix-darwin
jtojnar has quit [Remote host closed the connection]
jtojnar has joined #nix-darwin
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
philr has quit [Ping timeout: 256 seconds]
contrapumpkin has joined #nix-darwin