I came across an interesting thread on the NixOS subreddit today that helped me fix a problem that I didn't even know I had with my NixOS system configuration. Every now and then, I'll try to quickly do nix-shell -p somepackage, and it will fail, because somepackage couldn't be found. I go and check https://search.nixos.org and it's there. Huh. Weird. So I just go and add it to my environment.systemPackages to install it, and remove it if it turns out I don't really need it. This alternative step works because my system configuration flake is pointing to a different version of nixpkgs than the nix-shell command. So what's the solution? Let's make nix-shell use the same version of nixpkgs as the system configuration flake! {inputs, ...}: { nix = { registry = { nixpkgs = { flake = inputs.nixpkgs; }; }; nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" "nixos-config=/etc/nixos/configuration.nix" "/nix/var/nix/prof…
No pages have linked to this URL yet.