diff --git a/src/planner/mod.rs b/src/planner/mod.rs index 18b004779..ffb2bdbd8 100644 --- a/src/planner/mod.rs +++ b/src/planner/mod.rs @@ -158,16 +158,16 @@ dyn_clone::clone_trait_object!(Planner); #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "cli", derive(clap::Subcommand))] pub enum BuiltinPlanner { - #[cfg_attr(not(target_os = "linux"), clap(hide = true))] + #[cfg_attr(all(feature = "cli", not(target_os = "linux")), clap(hide = true))] /// A planner for traditional, mutable Linux systems like Debian, RHEL, or Arch Linux(linux::Linux), - #[cfg_attr(not(target_os = "linux"), clap(hide = true))] + #[cfg_attr(all(feature = "cli", not(target_os = "linux")), clap(hide = true))] /// A planner for the Valve Steam Deck running SteamOS SteamDeck(steam_deck::SteamDeck), - #[cfg_attr(not(target_os = "linux"), clap(hide = true))] + #[cfg_attr(all(feature = "cli", not(target_os = "linux")), clap(hide = true))] /// A planner suitable for immutable systems using ostree, such as Fedora Silverblue Ostree(ostree::Ostree), - #[cfg_attr(not(target_os = "macos"), clap(hide = true))] + #[cfg_attr(all(feature = "cli", not(target_os = "macos")), clap(hide = true))] /// A planner for MacOS (Darwin) systems Macos(macos::Macos), } diff --git a/src/settings.rs b/src/settings.rs index 16c7fca6d..26ed87e32 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -140,9 +140,9 @@ pub struct CommonSettings { )] pub nix_package_url: Option, - #[clap(from_global)] + #[cfg_attr(feature = "cli", clap(from_global))] pub proxy: Option, - #[clap(from_global)] + #[cfg_attr(feature = "cli", clap(from_global))] pub ssl_cert_file: Option, /// Extra configuration lines for `/etc/nix.conf`