Sonarpulse has quit [Ping timeout: 246 seconds]
Lisanna has joined #nix-darwin
philr has joined #nix-darwin
pxc1 has joined #nix-darwin
pxc1 has quit [Client Quit]
pxc has quit [Quit: WeeChat 2.0]
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 246 seconds]
pxc has joined #nix-darwin
<Lisanna> nix.trustedUsers is causing my builds to break :/
<Lisanna> when I add myself to it suddenly what's supposed to be a remote build starts trying to run x86_64-linux bash on my mac laptop, and that fails
<mightybyte> LnL: If I include a package in environment.systemPackages and then remove it, how do I get it out of my path?
<Lisanna> mightybyte it should be removed from your path once you do a darwin-rebuild switch
<mightybyte> Lisanna: Hmmm, I've done that. But for some reason I have binaries for both 1.11 and 2.0 installed.
<mightybyte> The 2.0 binaries are in /nix/var/nix/profiles/default/bin/nix and the 1.11 binaries are in /run/current-system/sw/bin/nix-shell
<mightybyte> Unfortunately the latter comes earlier in my path so those binaries take priority.
<pxc> you removed it from environment.systemPackages, but it's still in /run/current-system/sw/bin after `nix-darwin rebuild switch`?
<mightybyte> pxc: After `darwin-rebuild switch`, yes.
<pxc> whoops!
<mightybyte> I guess I don't actually know how the /run/current-system/sw/bin/nix-shell version got there, but I assumed it was nix-darwin because I used to have nix-shell in the systemPackages there.
<pxc> /run/current-system/ belongs to nix-darwin, yeah
<mightybyte> How do I get rid of things in there?
<pxc> what you're describing is a bug in the essential functionality of nix-darwin, or we've misunderstood the situation
<pxc> what you've done should have removed it
<pxc> I can think of some things we can do to explore what's going on here. Are you ready to try some things? I'll try to explain along the way
<mightybyte> Sure
<pxc> what's the output of `darwin-rebuild --list-generations`?
<mightybyte> 16 lines
<mightybyte> 14 2018-03-14 13:20:46
<mightybyte> 15 2018-03-14 13:36:58
<mightybyte> 16 2018-03-19 08:17:17 (current)
<pxc> ok. So these generations are the successive generations of your system-- each time `darwin-rebuild` changes your system, you get a new one
<mightybyte> ok
<pxc> we can also look at these generations on the disk-- they're just files. They're symlinks into the Nix store, just like everything in ~/.nix-profile
<pxc> take a look in /nix/var/nix/profiles to see them
<mightybyte> There's default-{1-4}-link and system-{1-10}-link symlinks
<pxc> the default profile is root's user profile
<pxc> that's the one Nix is installed in when you install Nix with the curl|sh installer
<mightybyte> Oh, scratch that last comment. There's system-{1-16]-link
<pxc> the system profile is the one managed by nix-darwin, and the one that relates to configuration change in environment.systemPackages
<pxc> yeah, it should match the number of generations you saw :-)
<pxc> so nix-darwin uses a profile just like the Nix profiles, and it calls it the system profile (this convention is taken from NixOS)
<mightybyte> Ok, that makes sense.
<pxc> if you've removed software from your darwin-configuration.nix or whatever it's called by default, and then switched generations using `darwin-rebuild switch`, but you're seeing the same stuff between generations, the first thing I'd check is that you're really switching successfully. the second is that the content of each generation was right
<pxc> so make some other change (another change in systemPackages would be easy)
<pxc> then list generations and look around /nix/var/nix/profiles before and after `darwin-rebuild switch`
<mightybyte> Ok
<mightybyte> I added pkgs.wget to environment.systemPackages, then ran `darwin-rebuild switch` and wget became available.
<mightybyte> It was not installed before.
<mightybyte> `which wget` returned /run/current-system/sw/bin/wget
<mightybyte> Now I removed wget and re-ran darwin-rebuild switch and it disappeared.
<mightybyte> So it seems to be working as expected.
<mightybyte> But for some reason /run/current-system/sw/bin/ still has a bunch of nix-1.11.16 binaries.
<pxc> huh. could you share the whole contents of your darwin-configuration.nix?
<pxc> oh! it's right there at the top, I bet. 1 sec
<mightybyte> Yep!
<mightybyte> nix.package = pkgs.nix;
<mightybyte> I just removed it and they disappeared.
<mightybyte> So I guess the question is...why didn't that give me 2.0 stuff?
<pxc> what's the output of `nix run nixpkgs.nix-info -c nix-info`?
<mightybyte> error: attribute 'nixpkgs' in selection path 'nixpkgs.nix-info' not found
<pxc> huh. how about `nix-shell -p nix-info --run nix-info`?
<pxc> my guess is nix-darwin and you (your user) are using different versions of Nixpkgs
<mightybyte> Oh, that could be.
<mightybyte> How do you synchronize them?
<pxc> I forgot because my setup is different, lol
<mightybyte> Ahh, ok.
<mightybyte> Well thanks for teh help.
<pxc> so first show me what's on $NIX_PATH and then the output of `nix-channel --list` as yourself and then as root
<pxc> I forget how `sudo` works or I'd probably know a better way to do this, but to really run it as root use `sudo -i` and then `nix-channel --list`
<pxc> on macOS sudo doesn't change your home directory by default or something
<pxc> oh, yeah. that's it. `sudo -H nix-channel --list` will work
<pxc> mightybyte: you there?
<mightybyte> $NIX_PATH is "darwin-config=/Users/mightybyte/.nixpkgs/darwin-configuration.nix:/nix/var/nix/profiles/per-user/root/channels:/Users/mightybyte/.nix-defexpr/channels"
<mightybyte> nix-channel --list gives "darwin https://github.com/LnL7/nix-darwin/archive/master.tar.gz
<mightybyte> As root...
<mightybyte> darwin-config=/var/root/.nixpkgs/darwin-configuration.nix:/nix/var/nix/profiles/per-user/root/channels:/var/root/.nix-defexpr/channels
<mightybyte> and
<pxc> just copy/paste the whole series of commands into pastebin next time :-)
<pxc> so Nix gives each user their own channels: https://nixos.org/nix/manual/#sec-channels
<pxc> nix-darwin probably uses the default profile's channel for nixpkgs, which is root's
<pxc> is Nix in your user profile as well as the default one? what's the output of `which -a nix`?
<pxc> that's just one place it's installed
<pxc> well, if you remove the nixpkgs channel as your own user, it'll use root's instead
<pxc> then to update nixpkgs just use `sudo -H nix-channel --update` to update nixpkgs
<pxc> to update ... to update -- kill me
<mightybyte> Ahh, ok.
<pxc> you can check which version of Nix each user sees by running `nix-build '<nixpkgs>' -A nix --no-out-link`. Whether the output differs between them will depend on which versions of Nixpkgs are in the channels of each and how they get resolved in each user's NIX_PATH
<pxc> you can actually compare them if you look inside /nix/var/nix/profiles/per-user/*/channels, if you want to
<pxc> you can look at each one's store path if you use `realpath`
<pxc> e.g., nix-shell -p coreutils --run "realpath /nix/var/nix/profiles/per-user/*/channels/nixpkgs"
<pxc> you can install the GNU coreutils to a profile with Nix (I do on my Macs), but some scripts that expect other the coreutils that come with macOS will break if you do that
jtojnar_ has joined #nix-darwin
jtojnar has quit [Read error: Connection reset by peer]
<pxc> mightybyte: are/were you and root on two different versions of nixpkgs or was I barking up the wrong tree?
jtojnar has joined #nix-darwin
jtojnar_ has quit [Ping timeout: 240 seconds]
Lisanna has quit [Quit: Lisanna]
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nix-darwin
pxc has quit [Quit: WeeChat 2.0]
jtojnar has quit [Read error: Connection reset by peer]
jtojnar_ has joined #nix-darwin
jtojnar_ is now known as jtojnar
zzamboni has joined #nix-darwin
zzamboni1 has joined #nix-darwin
zzamboni has quit [Read error: Connection reset by peer]
zzamboni1 has quit [Read error: Connection reset by peer]
zzamboni has joined #nix-darwin
periklis has joined #nix-darwin
periklis has quit [Ping timeout: 256 seconds]
philr has quit [Ping timeout: 246 seconds]
_rvl_ has quit [Quit: ZNC 1.6.5 - http://znc.in]
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
__Sander__ has joined #nix-darwin
jtojnar_ has joined #nix-darwin
jtojnar has quit [Quit: jtojnar]
jtojnar_ has quit [Ping timeout: 240 seconds]
zzamboni has quit [Quit: Leaving.]
philr has joined #nix-darwin
zzamboni has joined #nix-darwin
zzamboni has quit [Ping timeout: 256 seconds]
philr has quit [Quit: WeeChat 2.0.1]
zzamboni has joined #nix-darwin
zzamboni has quit [Ping timeout: 240 seconds]
jtojnar has joined #nix-darwin
zzamboni has joined #nix-darwin
zzamboni has quit [Ping timeout: 240 seconds]
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nix-darwin
jtojnar has quit [Ping timeout: 264 seconds]
<gchristensen> LnL: how do I fix this again? ln: failed to create symbolic link '/run/current-system': No such file or directory
<LnL> sudo ln -s private/var/run /run
<gchristensen> should I put a / before privatee?
<LnL> you can but that's not required
<gchristensen> ok
<LnL> could you create an issue for that and whatever else is missing for the hydra deployment stuff?
<LnL> I assume you ran into some of the sanity checks
<gchristensen> looks like I should just run the proper installer :P
<LnL> sure, but that shouldn't be necessary with a remote build
<LnL> or don't you want that anymore?
<gchristensen> oh I definitely do
<gchristensen> need to add something to handle "error: Found nix-daemon.sh reference in /etc/profile, aborting activation"
<LnL> yeah... the installer does all that
<gchristensen> yeah that is why I'm thinking maybe I should just run the installer
<LnL> the installer also uses the darwin-config if it exists already
<LnL> so you can make it do some extra stuff in there if necessary
<LnL> it doesn't do nix.conf yet but I should add that
zzamboni has joined #nix-darwin
<LnL> also you don't have to use the actual installer, everything important is part of the configuration.nix
shlevy has joined #nix-darwin
<LnL> you could import that or something
<gchristensen> yeah :)
<shlevy> Anyone have any insights on why a bunch of builds have been hanging at "checking for SDL" lately?
<gchristensen> LnL: I copied over the important bits: https://gist.github.com/grahamc/ab4b3d9c96d742e0e7086b5a3483334d and just run the deploy twice to make it go
ryanartecona has joined #nix-darwin
<LnL> you'll want to use the preActivation and preUserActivation
<LnL> then it shouls just work in one go
<gchristensen> oh
<gchristensen> !
<niksnut> shlevy: it's hanging in a conftest
<niksnut> if I run it from the command line, it says:
<niksnut> nixos-mac6:chocolate-doom-chocolate-doom-2.3.0 root# ./conftest
<niksnut> _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
<niksnut> and hangs
<gchristensen> hmm LnL on activation this one doesn't try to reload nix-daemon it seems: https://gist.github.com/grahamc/f786d9d1f64ff3dc910dd2d627799bd5
<gchristensen> in fact there are three nix-daemons :o
<LnL> that's normal if there are builds/substitutes
<gchristensen> hmm ok
<shlevy> gchristensen: every connection spawns a new nix-daemon process
<gchristensen> right right
<LnL> but the reload condition looks ok, I'd expect it to work even nix.conf is new
<LnL> unless the order isn't correct...
<gchristensen> if nix is installed in to the user profile, will nix-darwin replace it?
<LnL> no, if you don't set nix.package the installed version will be used but I'm thinking of changing that
<gchristensen> d'oh!
ryanartecona has quit [Quit: ryanartecona]
<LnL> yeah, I did it like that because of the single-user/multi-user support
<LnL> I should have made that explicit instead of supporting both cases out of the box
<gchristensen> it is okay :)
<gchristensen> oops, some odd behavior I was finding stemmed from me passing in `pkgs` instead of `nixpkgs` to import <darwin>
<LnL> like NIX_PATH=pkgs=...?/
<gchristensen> https://gist.github.com/grahamc/981c3d0b4e57d8ae1b33e497dfb8cda5 this but specifying pkgs instead
<LnL> ah :)
periklis has joined #nix-darwin
periklis has quit [Remote host closed the connection]
dtz has quit [Ping timeout: 248 seconds]
dtz has joined #nix-darwin
Sonarpulse has joined #nix-darwin
periklis has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
periklis has quit [Ping timeout: 240 seconds]
stqism has quit [Quit: Like 3 fire emojis lit rn 🔥🔥🔥]
philr has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
Lisanna has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Ping timeout: 246 seconds]
jtojnar has joined #nix-darwin
<cbarrett> was scratching my head trying to figure out why I couldn't build my app from the command line
<cbarrett> I happened to be in a nix-shell
<cbarrett> which patches ld
<cbarrett> to disable the -dynamiclib option
<cbarrett> among others :)
__Sander__ has quit [Quit: Konversation terminated!]
yastero has quit [Ping timeout: 276 seconds]
yastero has joined #nix-darwin
philr has quit [Ping timeout: 246 seconds]
zzamboni has joined #nix-darwin
zzamboni has quit [Read error: Connection reset by peer]
peacememories has joined #nix-darwin
zzamboni has joined #nix-darwin
zzamboni has quit [Read error: Connection reset by peer]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Read error: Connection reset by peer]
zzamboni has joined #nix-darwin
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nix-darwin
ryanartecona has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
ryanartecona has quit [Quit: ryanartecona]
jtojnar_ has joined #nix-darwin
jtojnar has quit [Ping timeout: 240 seconds]
jtojnar_ is now known as jtojnar
peacememories has quit [Quit: Textual IRC Client: www.textualapp.com]
elasticdog has quit [Ping timeout: 248 seconds]
elasticdog has joined #nix-darwin
zzamboni has joined #nix-darwin