Add node filter to build and upload-keys

This commit is contained in:
i1i1 2023-08-11 19:04:39 +03:00 committed by Zhaofeng Li
parent 495fc56f6e
commit 95ded7fddb
2 changed files with 3 additions and 5 deletions

View file

@ -296,7 +296,6 @@ pub async fn run() {
let args = command::apply::Opts {
deploy,
goal: crate::nix::Goal::Build,
node_filter: Default::default(),
};
r(command::apply::run(hive, args), opts.config).await
}
@ -304,7 +303,6 @@ pub async fn run() {
let args = command::apply::Opts {
deploy,
goal: crate::nix::Goal::UploadKeys,
node_filter: Default::default(),
};
r(command::apply::run(hive, args), opts.config).await
}

View file

@ -113,6 +113,8 @@ will treat deployment.replaceUnknownProfiles as though it was set true and perfo
This is an experimental feature."#
)]
evaluator: EvaluatorType,
#[command(flatten)]
node_filter: NodeFilterOpts,
}
#[derive(Debug, Args)]
@ -136,8 +138,6 @@ Same as the targets for switch-to-configuration, with the following extra pseudo
pub goal: Goal,
#[command(flatten)]
pub deploy: DeployOpts,
#[command(flatten)]
pub node_filter: NodeFilterOpts,
}
pub async fn run(hive: Hive, opts: Opts) -> Result<(), ColmenaError> {
@ -159,8 +159,8 @@ pub async fn run(hive: Hive, opts: Opts) -> Result<(), ColmenaError> {
no_build_on_target,
force_replace_unknown_profiles,
evaluator,
},
node_filter,
},
} = opts;
if node_filter.on.is_none() && goal != Goal::Build {