treewide: make more settings conditionally available

Some settings only make sense on particular platforms, or only when a certain
experimental feature is enabled. Several of those were already conditionally
available. Do the same for a bunch more instead of silently ignoring them.
Exceptionally, the use-case-hack setting is not made conditional because it is
included in the test suite.

Change-Id: I29e66ad8ee6178a7c0eff9efb55c3410fae32514
This commit is contained in:
Alois Wohlschlager
2024-10-15 19:55:50 +02:00
parent ece99fee23
commit 689eb45630
2 changed files with 20 additions and 9 deletions
+6 -3
View File
@@ -19,13 +19,16 @@ using namespace nix;
struct DevelopSettings : Config
{
Setting<std::string> bashPrompt{this, "", "bash-prompt",
"The bash prompt (`PS1`) in `nix develop` shells."};
"The bash prompt (`PS1`) in `nix develop` shells.",
{}, true, Xp::NixCommand};
Setting<std::string> bashPromptPrefix{this, "", "bash-prompt-prefix",
"Prefix prepended to the `PS1` environment variable in `nix develop` shells."};
"Prefix prepended to the `PS1` environment variable in `nix develop` shells.",
{}, true, Xp::NixCommand};
Setting<std::string> bashPromptSuffix{this, "", "bash-prompt-suffix",
"Suffix appended to the `PS1` environment variable in `nix develop` shells."};
"Suffix appended to the `PS1` environment variable in `nix develop` shells.",
{}, true, Xp::NixCommand};
};
static DevelopSettings developSettings;