Settings aliases are not supported as flags, while their "real" names are #10989
Labels
bug
idea approved
The given proposal has been discussed and approved by the Nix team. An implementation is welcome.
settings
Settings, global flags, nix.conf
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
nix eval --expr '{}' --build-cores 0
build-cores
is not recognized (despite there being an alias to it fromcores
)--cores 0
and 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 --version
outputReproduced on
nix-env (Nix) 2.21.2
,nix-env (Nix) 2.23.1
, andnix-env (Nix) 2.24.0pre20240617_daf1b6b
Additional context
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: