diff options
author | Andrew Fontaine | 2022-01-26 22:10:49 -0500 |
---|---|---|
committer | Andrew Fontaine | 2022-01-28 16:18:12 -0500 |
commit | 874af9b05bec0bd73a333166a8b5291ecb1c0e3e (patch) | |
tree | 3ec4c68c7a2bb93baea99c91c272c592eac3447a /src/cli.rs | |
parent | 0ac333cdc03407538b5b19d60a8e7c64588490fb (diff) |
Add custom sudo command support
This is useful for nodes that utilize `doas` instead of `sudo`.
Diffstat (limited to '')
-rw-r--r-- | src/cli.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -89,6 +89,9 @@ pub struct Opts { /// Revoke all previously succeeded deploys when deploying multiple profiles #[clap(long)] rollback_succeeded: Option<bool>, + /// Which sudo command to use. Must accept at least two arguments: user name to execute commands as and the rest is the command to execute + #[clap(long)] + sudo: Option<String>, } /// Returns if the available Nix installation supports flakes @@ -635,6 +638,7 @@ pub async fn run(args: Option<&ArgMatches>) -> Result<(), RunError> { temp_path: opts.temp_path, confirm_timeout: opts.confirm_timeout, dry_activate: opts.dry_activate, + sudo: opts.sudo, }; let supports_flakes = test_flake_support().await.map_err(RunError::FlakeTest)?; |