From 495fc56f6effc7e5e7e31f714dbf2924605e1271 Mon Sep 17 00:00:00 2001 From: i1i1 Date: Fri, 11 Aug 2023 18:33:45 +0300 Subject: [PATCH] Remove some commands on some profiles and add default goal for apply --- src/cli.rs | 2 ++ src/command/apply.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index ebfebcd..149583d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -284,11 +284,13 @@ pub async fn run() { match opts.command { Command::Apply(args) => r(command::apply::run(hive, args), opts.config).await, + #[cfg(target_os = "linux")] Command::ApplyLocal(args) => r(command::apply_local::run(hive, args), opts.config).await, Command::Eval(args) => r(command::eval::run(hive, args), opts.config).await, Command::Exec(args) => r(command::exec::run(hive, args), opts.config).await, Command::NixInfo => r(command::nix_info::run(), opts.config).await, Command::Repl => r(command::repl::run(hive), opts.config).await, + #[cfg(debug_assertions)] Command::TestProgress => r(command::test_progress::run(), opts.config).await, Command::Build { deploy } => { let args = command::apply::Opts { diff --git a/src/command/apply.rs b/src/command/apply.rs index 823d3a6..db3e791 100644 --- a/src/command/apply.rs +++ b/src/command/apply.rs @@ -130,6 +130,7 @@ Same as the targets for switch-to-configuration, with the following extra pseudo `switch` is the default goal unless `--reboot` is passed, in which case `boot` is the default. "#, + default_value_t, default_value_if("reboot", ArgPredicate::IsPresent, Some("boot")) )] pub goal: Goal,