nix
nix copied to clipboard
better descriptions of options in `nix help`
nix help
currently displays:
Options to override configuration settings:
· --access-tokens value
Set the access-tokens setting.
· --allow-dirty
Enable the allow-dirty setting.
· --allow-import-from-derivation
Enable the allow-import-from-derivation setting.
etc. which is rather unhelpful. Better descriptions of these options exits, and just need to get pulled in correctly.
CC @garbas @regnat @tomberek
I have tried to solve this by adding the description
member from the setting to the flag's description.
It works, but the output is much more verbose and also the phrasing doesn't always seem ideal in context.
An example:
· --no-keep-env-derivations
Disable the keep-env-derivations setting.
If false (default), derivations are not stored in Nix user environments. That is, the derivations of any build-time-only dependencies may be garbage-collected.
If true, when you add a Nix derivation to a user environment, the path of the derivation is stored in the user environment. Thus, the derivation will not be garbage-collected until the user environment generation is deleted
(nix-env --delete-generations). To prevent build-time-only dependencies from being collected, you should also turn on keep-outputs.
The difference between this option and keep-derivations is that this one is “sticky”: it applies to any user environment created while this option was enabled, while keep-derivations only applies at the moment the
garbage collector is run.
Made a draft MR in case you want to check it out. I think the indentation of the descriptions might need fixing, but I couldn't figure out how the fmt machinery works yet.