aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/utils.nix
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/utils.nix')
-rw-r--r--doc/manual/utils.nix20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/manual/utils.nix b/doc/manual/utils.nix
index e69cbe658..9043dd8cd 100644
--- a/doc/manual/utils.nix
+++ b/doc/manual/utils.nix
@@ -44,7 +44,7 @@ rec {
optionalString = cond: string: if cond then string else "";
- showSetting = { useAnchors }: name: { description, documentDefault, defaultValue, aliases, value }:
+ showSetting = { useAnchors }: name: { description, documentDefault, defaultValue, aliases, value, experimentalFeature }:
let
result = squash ''
- ${if useAnchors
@@ -54,10 +54,28 @@ rec {
${indent " " body}
'';
+ experimentalFeatureNote = optionalString (experimentalFeature != null) ''
+ > **Warning**
+ > This setting is part of an
+ > [experimental feature](@docroot@/contributing/experimental-features.md).
+
+ To change this setting, you need to make sure the corresponding experimental feature,
+ [`${experimentalFeature}`](@docroot@/contributing/experimental-features.md#xp-feature-${experimentalFeature}),
+ is enabled.
+ For example, include the following in [`nix.conf`](#):
+
+ ```
+ extra-experimental-features = ${experimentalFeature}
+ ${name} = ...
+ ```
+ '';
+
# separate body to cleanly handle indentation
body = ''
${description}
+ ${experimentalFeatureNote}
+
**Default:** ${showDefault documentDefault defaultValue}
${showAliases aliases}