nix
nix copied to clipboard
nix-build --help fails with invalid nix.conf
It looks like nix-build's help flag can't be used without a valid config (even though the message for an invalid config tells you to check the help). Clipping original comment below:
... I'm now receiving the following error after entering nix-build -A plutus-playground.server:
error: illegal configuration line 'https://cache.nixos.org/' in '/etc/nix/nix.conf'
Try 'nix-build --help' for more information.
And running nix-build --help produces the same result:
error: illegal configuration line 'https://cache.nixos.org/' in '/etc/nix/nix.conf'
Try 'nix-build --help' for more information.
Originally posted by @Dave-Lindberg in https://github.com/NixOS/nix/issues/6876#issuecomment-1207138311
Bit silly indeed… Making nix --help work with an invalid config would probably be a bit of a pain, but it should be fairly easy to just change the message to redirect to man nix.conf in that case