Simplify documentation of the default value for enable options 📝

This commit is contained in:
Daniel Thwaites 2022-08-12 19:14:07 +01:00
parent 308f7e27cb
commit 3339cc7991
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D

View file

@ -25,13 +25,14 @@ with lib;
mkOption {
description = "Whether to style ${humanName}.";
type = types.bool;
defaultText = literalDocBook ''
When <literal>stylix.autoEnable</literal> is <literal>true</literal>:
Enabled when ${humanName} is installed.
When <literal>stylix.autoEnable</literal> is <literal>false</literal>:
Defaults to <literal>false</literal>.
# We can't substitute the target name into this description because some
# don't make sense: "if the desktop background using Feh is installed"
defaultText = literalDocBook ''
<literal>true</literal> if <literal>stylix.autoEnable == true</literal>
and the target is installed, otherwise <literal>false</literal>.
'';
default = config.stylix.autoEnable && autoEnable;
};
}