Nix usage impossible after Error in nix.conf

Unfortunately I have borked my system nix.conf by setting an environment variable on NIX_CONFIG to an invalid config.

Trying to use any nix command, I’m getting an error that I have an syntax error in nix.conf that I cannot change in my configuration.nix obviously. Any suggestions how I can override nix daemon to use /etc/nix/nix.conf instead from the store?

Stip the service. Run the daemon manually with the same environment, but without the incorrect env. Run nix commands as needed.

2 Likes

Yep, that did it to solve it. Somehow I messed up triggering home-manager to populate a second falsey personal nix.conf under ~/.config/nix…