File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,12 @@ pub struct Opts {
111
111
/// Prompt for sudo password during activation.
112
112
#[ arg( long) ]
113
113
interactive_sudo : Option < bool > ,
114
+ /// File for the sudo password with sops integration
115
+ #[ arg( long) ]
116
+ sudo_file : Option < PathBuf > ,
117
+ /// Key for the sudo password with sops integration
118
+ #[ arg( long) ]
119
+ sudo_secret : Option < String > ,
114
120
}
115
121
116
122
/// Returns if the available Nix installation supports flakes
@@ -812,7 +818,9 @@ pub async fn run(args: Option<&ArgMatches>) -> Result<(), RunError> {
812
818
dry_activate : opts. dry_activate ,
813
819
remote_build : opts. remote_build ,
814
820
sudo : opts. sudo ,
815
- interactive_sudo : opts. interactive_sudo
821
+ interactive_sudo : opts. interactive_sudo ,
822
+ sudo_file : opts. sudo_file ,
823
+ sudo_secret : opts. sudo_secret ,
816
824
} ;
817
825
818
826
let supports_flakes = test_flake_support ( ) . await . map_err ( RunError :: FlakeTest ) ?;
Original file line number Diff line number Diff line change @@ -166,6 +166,8 @@ pub struct CmdOverrides {
166
166
pub activation_timeout : Option < u16 > ,
167
167
pub sudo : Option < String > ,
168
168
pub interactive_sudo : Option < bool > ,
169
+ pub sudo_file : Option < PathBuf > ,
170
+ pub sudo_secret : Option < String > ,
169
171
pub dry_activate : bool ,
170
172
pub remote_build : bool ,
171
173
}
@@ -499,6 +501,12 @@ pub fn make_deploy_data<'a, 's>(
499
501
if let Some ( interactive_sudo) = cmd_overrides. interactive_sudo {
500
502
merged_settings. interactive_sudo = Some ( interactive_sudo) ;
501
503
}
504
+ if let Some ( ref sudo_file) = cmd_overrides. sudo_file {
505
+ merged_settings. sudo_file = Some ( sudo_file. to_owned ( ) ) ;
506
+ }
507
+ if let Some ( ref sudo_secret) = cmd_overrides. sudo_secret {
508
+ merged_settings. sudo_secret = Some ( sudo_secret. to_owned ( ) ) ;
509
+ }
502
510
503
511
DeployData {
504
512
node_name,
You can’t perform that action at this time.
0 commit comments