diff options
author | Graham Christensen <graham@grahamc.com> | 2021-12-17 11:14:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 11:14:08 -0500 |
commit | 06edb74413eb4e4ac56921ef2c038d8f106b15df (patch) | |
tree | 897b78ed67fd8ffb0938fc85f52a496ff9785e7c /nixos/modules/tasks | |
parent | 4edd5c91ca09665e33f705d280a4d9f7f093605f (diff) | |
parent | e67a646a925bc3cda86101a3f3afb81db3030ef5 (diff) | |
download | nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.gz nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.bz2 nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.lz nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.xz nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.zst nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.zip |
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 5 | ||||
-rw-r--r-- | nixos/modules/tasks/network-interfaces.nix | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 65364801c32..3bc0dedec00 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, utils, ... }: +{ config, lib, options, pkgs, utils, ... }: # # TODO: zfs tunables @@ -8,6 +8,7 @@ with lib; let cfgZfs = config.boot.zfs; + optZfs = options.boot.zfs; cfgExpandOnBoot = config.services.zfs.expandOnBoot; cfgSnapshots = config.services.zfs.autoSnapshot; cfgSnapFlags = cfgSnapshots.flags; @@ -112,6 +113,7 @@ in readOnly = true; type = types.bool; default = inInitrd || inSystem; + defaultText = literalDocBook "<literal>true</literal> if ZFS filesystem support is enabled"; description = "True if ZFS filesystem support is enabled"; }; @@ -346,6 +348,7 @@ in services.zfs.zed = { enableMail = mkEnableOption "ZED's ability to send emails" // { default = cfgZfs.package.enableMail; + defaultText = literalExpression "config.${optZfs.package}.enableMail"; }; settings = mkOption { diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 49901cda848..3d1fa793eb3 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -6,6 +6,7 @@ with utils; let cfg = config.networking; + opt = options.networking; interfaces = attrValues cfg.interfaces; hasVirtuals = any (i: i.virtual) interfaces; hasSits = cfg.sits != { }; @@ -1169,6 +1170,9 @@ in networking.tempAddresses = mkOption { default = if cfg.enableIPv6 then "default" else "disabled"; + defaultText = literalExpression '' + if ''${config.${opt.enableIPv6}} then "default" else "disabled" + ''; type = types.enum (lib.attrNames tempaddrValues); description = '' Whether to enable IPv6 Privacy Extensions for interfaces not |