diff options
author | pennae <github@quasiparticle.net> | 2021-12-05 22:06:49 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2021-12-09 01:38:24 +0100 |
commit | 2d564521c094b17e88707ac95cb4b6331b1b709a (patch) | |
tree | 39be0a04a8835f7682dd70aae57d85ca46db7c3d /nixos/modules/system | |
parent | 6eaf4f90c2b25918109fb2689d56e33a4f59f37d (diff) | |
download | nixpkgs-2d564521c094b17e88707ac95cb4b6331b1b709a.tar nixpkgs-2d564521c094b17e88707ac95cb4b6331b1b709a.tar.gz nixpkgs-2d564521c094b17e88707ac95cb4b6331b1b709a.tar.bz2 nixpkgs-2d564521c094b17e88707ac95cb4b6331b1b709a.tar.lz nixpkgs-2d564521c094b17e88707ac95cb4b6331b1b709a.tar.xz nixpkgs-2d564521c094b17e88707ac95cb4b6331b1b709a.tar.zst nixpkgs-2d564521c094b17e88707ac95cb4b6331b1b709a.zip |
treewide: add literalDocBook text to options with complex defaults
some options have default that are best described in prose, such as defaults that depend on the system stateVersion, defaults that are derivations specific to the surrounding context, or those where the expression is much longer and harder to understand than a simple text snippet.
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/activation/activation-script.nix | 1 | ||||
-rw-r--r-- | nixos/modules/system/boot/plymouth.nix | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix index 8dbfe393f10..154b6127b27 100644 --- a/nixos/modules/system/activation/activation-script.nix +++ b/nixos/modules/system/activation/activation-script.nix @@ -142,6 +142,7 @@ in readOnly = true; internal = true; default = systemActivationScript (removeAttrs config.system.activationScripts [ "script" ]) true; + defaultText = literalDocBook "generated activation script"; }; system.userActivationScripts = mkOption { diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index 4b8194d2f85..78ae8e9d20b 100644 --- a/nixos/modules/system/boot/plymouth.nix +++ b/nixos/modules/system/boot/plymouth.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; @@ -7,6 +7,7 @@ let inherit (pkgs) plymouth nixos-icons; cfg = config.boot.plymouth; + opt = options.boot.plymouth; nixosBreezePlymouth = pkgs.plasma5Packages.breeze-plymouth.override { logoFile = cfg.logo; @@ -71,6 +72,11 @@ in themePackages = mkOption { default = lib.optional (cfg.theme == "breeze") nixosBreezePlymouth; + defaultText = literalDocBook '' + A NixOS branded variant of the breeze theme when + <literal>config.${opt.theme} == "breeze"</literal>, otherwise + <literal>[ ]</literal>. + ''; type = types.listOf types.package; description = '' Extra theme packages for plymouth. |