Describe the bug
It is possible to specify nix.conf options on the command line with --<option name> <option value if necessary> (as opposed to --option <option name> <option value if necessary>). However, this does not appear to extend to aliases.
When running nix eval --expr '{}' --build-cores 0, the --build-cores flag is unrecognized. However, passing it as an --option allows it to work.
Steps To Reproduce
- Install Nix 2.23.1
- Run
nix eval --expr '{}' --build-cores 0
- See error that
build-cores is not recognized (despite there being an alias to it from cores)
- Try again with
--cores 0 and see it succeed
This is reproducible for all settings with aliases.
Expected behavior
Aliases of nix.conf settings should work when passed as a flag, without needing to resort to --option <setting alias name> <value>
nix-env --version output
Reproduced on nix-env (Nix) 2.21.2, nix-env (Nix) 2.23.1, and nix-env (Nix) 2.24.0pre20240617_daf1b6b
Additional context
Priorities
Add 👍 to issues you find important.
Describe the bug
It is possible to specify nix.conf options on the command line with
--<option name> <option value if necessary>(as opposed to--option <option name> <option value if necessary>). However, this does not appear to extend to aliases.When running
nix eval --expr '{}' --build-cores 0, the--build-coresflag is unrecognized. However, passing it as an--optionallows it to work.Steps To Reproduce
nix eval --expr '{}' --build-cores 0build-coresis not recognized (despite there being an alias to it fromcores)--cores 0and see it succeedThis is reproducible for all settings with aliases.
Expected behavior
Aliases of nix.conf settings should work when passed as a flag, without needing to resort to
--option <setting alias name> <value>nix-env --versionoutputReproduced on
nix-env (Nix) 2.21.2,nix-env (Nix) 2.23.1, andnix-env (Nix) 2.24.0pre20240617_daf1b6bAdditional context
Priorities
Add 👍 to issues you find important.