LnL7 / nix-darwin

nix modules for darwin
MIT License
2.77k stars 429 forks source link

darwin-rebuild: Incorrect usage description #812

Open PhilipBorgesen opened 10 months ago

PhilipBorgesen commented 10 months ago

Hey there, new user of nix-darwin. I like it so far but ran into some trouble using darwin-rebuild.

darwin-rebuild reports the following usage description:

darwin-rebuild [--help] {edit | switch | activate | build | check | changelog}
               [--list-generations] [{--profile-name | -p} name] [--rollback]
               [{--switch-generation | -G} generation] [--verbose...] [-v...]
               [-Q] [{--max-jobs | -j} number] [--cores number] [--dry-run]
               [--keep-going] [-k] [--keep-failed] [-K] [--fallback] [--show-trace]
               [-I path] [--option name value] [--arg name value] [--argstr name value]
               [--flake flake] [--update-input input flake] [--impure] [--recreate-lock-file]
               [--no-update-lock-file] [--refresh] ...

The --update-input input flake option as implemented only takes one value however (input) and requires the --flake option to also be passed. The following usage description ([--flake flake [--update-input input]]) would be more correct and less confusing:

darwin-rebuild [--help] {edit | switch | activate | build | check | changelog}
               [--list-generations] [{--profile-name | -p} name] [--rollback]
               [{--switch-generation | -G} generation] [--verbose...] [-v...]
               [-Q] [{--max-jobs | -j} number] [--cores number] [--dry-run]
               [--keep-going] [-k] [--keep-failed] [-K] [--fallback] [--show-trace]
               [-I path] [--option name value] [--arg name value] [--argstr name value]
               [--flake flake [--update-input input]] [--impure] [--recreate-lock-file]
               [--no-update-lock-file] [--refresh] ...

I haven't checked whether other options depend on the --flake option.

Enzime commented 9 months ago

Could you make a PR for this? I think all the options that appear after --flake are for flakes, I think --update-input input flake should actually be --override-input input flake and --update-input input should be a separate flag