mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
i3,sway: break documentation dependency on configuration
Before the documentation for a number of options had a dependency on the configuration.
This commit is contained in:
parent
90dd375eba
commit
f298705ae4
1 changed files with 8 additions and 13 deletions
|
@ -79,17 +79,13 @@ let
|
||||||
options = let
|
options = let
|
||||||
versionAtLeast2009 = versionAtLeast config.home.stateVersion "20.09";
|
versionAtLeast2009 = versionAtLeast config.home.stateVersion "20.09";
|
||||||
mkNullableOption = { type, default, ... }@args:
|
mkNullableOption = { type, default, ... }@args:
|
||||||
mkOption (args // optionalAttrs versionAtLeast2009 {
|
mkOption (args // {
|
||||||
type = types.nullOr type;
|
type = types.nullOr type;
|
||||||
default = null;
|
default = if versionAtLeast2009 then null else default;
|
||||||
example = default;
|
|
||||||
} // {
|
|
||||||
defaultText = literalExample ''
|
defaultText = literalExample ''
|
||||||
${
|
null for state version ≥ 20.09, as example otherwise
|
||||||
if isString default then default else "See code"
|
|
||||||
} for state version < 20.09,
|
|
||||||
null for state version ≥ 20.09
|
|
||||||
'';
|
'';
|
||||||
|
example = default;
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
fonts = mkOption {
|
fonts = mkOption {
|
||||||
|
@ -167,11 +163,9 @@ let
|
||||||
"\${pkgs.waybar}/bin/waybar";
|
"\${pkgs.waybar}/bin/waybar";
|
||||||
};
|
};
|
||||||
|
|
||||||
statusCommand = mkOption {
|
statusCommand = mkNullableOption {
|
||||||
type = types.nullOr types.str;
|
type = types.str;
|
||||||
default =
|
default = "${pkgs.i3status}/bin/i3status";
|
||||||
if versionAtLeast2009 then null else "${pkgs.i3status}/bin/i3status";
|
|
||||||
example = "i3status";
|
|
||||||
description = "Command that will be used to get status lines.";
|
description = "Command that will be used to get status lines.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -687,6 +681,7 @@ in {
|
||||||
};
|
};
|
||||||
}] else
|
}] else
|
||||||
[ { } ];
|
[ { } ];
|
||||||
|
defaultText = literalExample "see code";
|
||||||
description = ''
|
description = ''
|
||||||
${capitalModuleName} bars settings blocks. Set to empty list to remove bars completely.
|
${capitalModuleName} bars settings blocks. Set to empty list to remove bars completely.
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue