nix-community/nixos-anywhere

Feature request: `--extra-command` (counterpart to `--extra-files`)

Opened this issue · 0 comments

--no-reboot exists to allow for commands to be run on a remote host, presumptively to allow for additional "provisioners" to be run (e.g. running additional commands, consider a scenario where you copy files with --extra-files but permissions need to be modified or they need to be executed on the remote host).

However, the current workflow for this is a bit awkward in comparison to --extra-files. While --extra-files will run rsync with the auto-created and injected SSH key, this is removed on exit of the script and the additional commands need to be run using credentials created out-of-band.

It would be a nice quality of life to have the ability to run commands or shell scripts using the same credentials; perhaps with --extra-command (repeatable for multiple commands) or something similar, that would run after --extra-files and use the installation key in a similar way, to avoid the extra work.