hmpffff_ has joined #nix-darwin
hmpffff has quit [Ping timeout: 252 seconds]
abathur has joined #nix-darwin
hedgie has quit [Read error: Connection reset by peer]
hedgie has joined #nix-darwin
virus_dave has quit [Ping timeout: 272 seconds]
abathur has quit [Ping timeout: 245 seconds]
Chiliparrot has joined #nix-darwin
virus_dave has joined #nix-darwin
__monty__ has joined #nix-darwin
Ericson2314 has quit [Write error: Connection reset by peer]
thefloweringash has quit [Remote host closed the connection]
virus_dave has quit [Ping timeout: 248 seconds]
virus_dave has joined #nix-darwin
thefloweringash has joined #nix-darwin
Ericson2314 has joined #nix-darwin
virus_dave has quit [Quit: virus_dave]
hedgie has quit [Read error: Connection reset by peer]
hedgie has joined #nix-darwin
__monty__ has quit [Ping timeout: 268 seconds]
__monty__ has joined #nix-darwin
__monty__ has quit [Remote host closed the connection]
__monty__ has joined #nix-darwin
<__monty__> I'm getting warnings about a nix search path entry because I'm on a single-user install: http://ix.io/1PXW
<eraserhd> open 1
<__monty__> When I remove the entry from NIX_PATH however, I run into errors because 'darwin' or 'nixpkgs' can't be found.
<eraserhd> I have that warning also, I recall LnL saying there wasn't really a good fix, but I don't think I understood why.
<__monty__> Actually, here's a better paste: http://ix.io/1PXX
<eraserhd> I am surprised that you get that error when it isn't there, though. How are you removing it from your nix path?
<__monty__> What I'm confounded by is how having a non-existent path in the nix search path can possibly make a difference in how things like <nixpkgs> and <darwin> are resolved?
<__monty__> It's in the second paste. Fish's set -ge is equivalent to exporting NIX_PATH without the entry at index 2 (starting at 1).
<eraserhd> It looks like "darwin" wasn't set before, either? It's possible, I guess, that the darwin-rebuild script tries to insert this into the path after or before root/channels.
<eraserhd> Oh... maybe you don't have read access to per-user/root/channels, but it exists, and when you 'switch', it needs it because it uses sudo, but not when building.
<__monty__> Nope, listing it with sudo shows it's an empty directory. .../root that is.
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Chiliparrot has joined #nix-darwin
<LnL> there's an open issue for it, but nix probably shouldn't show warnings like this by default
<LnL> the default includes both root and the user's for compatibility
<__monty__> But why does having a nonexistent directory in the NIX_PATH change the result?
<__monty__> That sounds like an impurity to me.
<LnL> it doesn't
<LnL> nix just warns about it
<__monty__> LnL: Did you see my paste? If I remove that path I get an error.
<LnL> nix-instantiate --find-file 'darwin'
<__monty__> LnL: http://ix.io/1PYi
<LnL> why are there spaces in NIX_PATH
<__monty__> Because it's a fish array.
<__monty__> Just imagine the spaces are :'s.
<LnL> it's an environment variable, not an array
<LnL> nix-instantiate --find-file darwin-config probably doesn't work either
<__monty__> LnL: http://ix.io/1PYj
<LnL> yeah
<__monty__> Fish just uses arrays rather than colon seperated strings.
<LnL> so? nix doesn't
<__monty__> Then why does it work before removing the path to root's channels?
<LnL> because it's still a string there not an array
<__monty__> Nope, it's already an array.
<__monty__> I can index it just fine.
<__monty__> Which wouldn't work with a string.
<__monty__> Also, nix wouldn't handle a space seperated string anyway, right?
<LnL> huh
<LnL> what about /bin/sh -c 'echo $NIX_PATH' before and after?
<__monty__> o.O
<__monty__> It dissappears.
<LnL> well, no clue why that is but that's what nix sees
<__monty__> Alright, taking this to #fish, to the aquaman mobile!
<LnL> setting nix.nixPath appropriatly should do the trick tho
<LnL> but to remove an entry you need to defline darwin-config again
<LnL> nix.nixPath = lib.mkForce [ "darwin-config=$HOME/.nixpkgs/darwin-configuration.nix" "$HOME/.nix-defexpr/channels" ];
<__monty__> I kinda didn't want to do this through nixPath because I don't trust myself to keep it up to date.
<LnL> alternative would be to remove the entry if it doesn't exist, but that kind of defeats the purpose so I'd prefer to move the warning to debug in nix itself
<__monty__> I think it just shouldn't be added in the first place if the user decides to do a single-user install.
<LnL> that means putting it in the config file
hedgie has quit [Read error: Connection reset by peer]
<__monty__> How so? Isn't it defined in .nix-profile/etc/profile.d/nix.sh? Which differs between single- and multi-user installs afaiui. So the single-user version could just not add that path.
hedgie_ has joined #nix-darwin
bdesham has joined #nix-darwin
hmpffff_ has quit [Quit: nchrrrr…]
hmpffff has joined #nix-darwin
hmpffff has quit [Quit: nchrrrr…]
__monty__ has quit [Quit: leaving]