nix-darwin
nix-darwin copied to clipboard
Warning when running nix-darwin
I keep getting this warning:
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
This is a fresh install on MacOS Sierra, using the installer
procedure. Is this a sympton that I did something wrong? How do I get rid of such warning?
It's related to #140, multiple paths are added for compatibility with both the single and multi-user install. But nix complains if one of the defined search paths does not exist.
FYI, see my comment here on how to reset your NIX_PATH
to remove this warning.
Note my caveat that updating nix.nixPath
and running darwin-rebuild switch
for some reason does not update the NIX_PATH
environment variable until you source your setEnvironment
script.
Based on @ericpashman's linked response, this is what I went with:
{
nix.nixPath = pkgs.lib.mkForce [{
darwin-config = builtins.concatStringsSep ":" [
"$HOME/.nixpkgs/darwin-configuration.nix"
"$HOME/.nix-defexpr/channels"
];
}];
}
Seems to work.
Thanks @kubukoz , your solution works for me on latest MacOS big sur.