I’m going through the flake-based download of nix-darwin and running into issues executing the darwin-rebuild switch
command. I’d like to use the short version rather than the longer version shown in the instructions, but am running into two errors.
CONTEXT:
I am new to nix, and am on a mac.
I am able to run the darwin-rebuild switch --flake ~/.config/nix-darwin
command (reference) just fine, so I suspect that my configs are correct.
STEPS TAKEN:
The first error I received when running the darwin-rebuild switch
said that there is no ‘darwin’ path set in $NIX_PATH, so I added export NIX_PATH=darwin=$HOME/.config/nix-darwin:$NIX_PATH
to my .zshrc (and sourced it). That is the same path the longer command sends with the --flake flag.
That silenced the first error, but now I’m receiving 'error: attribute ‘system’ in selection path ‘system’ not found. When I fall back on the instructions and run the longer command (
darwin-rebuild switch --flake ~/.config/nix-darwin), it works as expected.
What am I missing?