hamishmack has quit [Read error: Connection reset by peer]
philr has joined #nix-darwin
philr has quit [Ping timeout: 246 seconds]
mog has quit [Quit: im quiting!]
mog has joined #nix-darwin
philr has joined #nix-darwin
<teehemkay>
Hi everyone. I think I'm seeing a strange issue related to nix-darwin and `nix search`. I just run `nix search rcm`, it worked with a warning about passing '-u' to update the cache. I run `nix search -u rcm` and now I get "error: no results for the search term". And search now returns the same error. I don't have this problem on my other Macs not (yet) running nix-darwin. Any idea what could be causing this issue? Thanks?
<teehemkay>
I mean any search I run using `nix search` now returns the same error
dmj` has quit [Ping timeout: 258 seconds]
dmj` has joined #nix-darwin
<Guest99428>
hi, your system is functional otherwise rigth?
Guest99428 is now known as LnL
<matthewbauer>
teehemkay: i think this happens when your NIX_PATH doesn't have `nixpkgs=` in it. Try `NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/$USER/channels/nixpkgs:$NIX_PATH nix search -u rcm`
<LnL>
why is that tho? everything else resolves unnamed entries just fine
<LnL>
problem is that your channel might be $USER or root depending on the installation
<matthewbauer>
LnL: I don't think the 2.0 can resolve unnamed like nix-env does. nix-env uses the old directory method where `NIX_PATH=/nix/var/nix/profiles/per-user/$USER/channels` implies infers `NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/$USER/channels/nixpkgs:nixos=/nix/var/nix/profiles/per-user/$USER/channels/nixos`
<matthewbauer>
not this one though: `NIX_PATH=.. nix run hello -c :`
<matthewbauer>
oh nevermind it does work! `NIX_PATH=.. nix run -f '<nixpkgs>' hello -c :`
<matthewbauer>
maybe it's a nix search only bug? `NIX_PATH=.. nix search -u`
<LnL>
the default nixpkgs.hello, etc. prefixes added for nix run should be the same codepath as nix search
* LnL
whishes that prefix was never added for 2.0 commands
asar has joined #nix-darwin
philr has quit [Ping timeout: 246 seconds]
<teehemkay>
Thanks everyone! I'll try adding `nixpkgs=` to `NIX_PATH` but I seem to recall that I already did that this week-end when I had the same issue, and it didn't correct the issue...
<teehemkay>
what's really strange though is that it has worked since the w-e and it suddenly failed for no apparent reason
<teehemkay>
Guest99428: yes, my system is functional otherwise
asar has quit [Ping timeout: 256 seconds]
johnw_ has joined #nix-darwin
johnw has quit [Ping timeout: 258 seconds]
<LnL>
teehemkay: configuring nix.nixPath should work, you just couldn't apply it last time because of the other problem
<LnL>
nix-datwin doesn't configure a named entry at the moment because it's location depends on the installation type
<teehemkay>
LnL: Thanks! So I should just add `nix.nixPath = [{ nixpkgs = "/nix/var/nix/profiles/per-user/root/channels/nixpkgs"; }];` to my config right?
<teehemkay>
Will try that as soon as I'm back to my Mac later tonight
<LnL>
I'm around for an hour or so more
<LnL>
if you run into trouble: remove the option, darwin-rebuild switch --rollback, and start a new shell
<teehemkay>
LnL: It worked and `nix search` now works 😀
<LnL>
great
<LnL>
maybe create an issue for it, I could make the default generated configuration.nix dynamic based on the install or something