lf- / flakey-profile

Declarative profiles with nix flakes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

default template removes nix from path

adrian-gierakowski opened this issue · comments

nix flake init -t github:lf-/flakey-profile#templates.default
nix run .#profile.switch

I end up without nix on PATH without clear path to recover.

Fortunately I ran it in a container :)

Maybe the example should include nix in profile.paths?

oh gods. this is because of macOS/possibly others putting nix in /nix/var/nix/profiles/per-user/root instead of /nix/var/nix/profiles/default being a separate profile for root, then running a profile switch command as root on a profile without nix in it. I have no idea why they did this, but it doesn't seem like a good choice on their part.

This was in a Linux container (Debian based) with nix installed via https://github.com/DeterminateSystems/nix-installer

note that I was doing this as root

For me Nix is in /nix/var/nix/profiles/default/bin/nix on Darwin (via DeterminateSystems/nix-installer).