dustinlyons / nixos-config

General purpose Nix configuration for macOS / NixOS with starter templates + step-by-step guides ✨
BSD 3-Clause "New" or "Revised" License
1.78k stars 113 forks source link

Step 3. will fail if you don't reload PATH or spawn a new shell? Not mentioned in the README? #81

Closed victorhooi closed 5 months ago

victorhooi commented 6 months ago

After running the command in step 2., I then attempted to run the command in step 3. Initialise a starter template:

foobar:~ foobar$ mkdir -p nixos-config && cd nixos-config && nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter
-bash: nix: command not found

It seems I need to restart the shell for it to work (I assume for the PATH)

Should this be mentioned in the README? Or maybe just explicitly add the command to reload the PATH?

Also - the actual command above (for step 3). gives a relative path - is the implication that nixos-config should live under $HOME? Or is that meant to be up to the user? Might be worth making that a bit more explicit.

dustinlyons commented 6 months ago

Updated instructions based on this and instructions from https://zero-to-nix.com/start/install.

Doesn't matter where nixos-config lives, the command creates and then changes directory into the nixos-config dir. Then installs the configuration there.

dustinlyons commented 6 months ago

Thanks for bringing this to my attention!