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/security | |
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/security')
-rw-r--r-- | nixos/modules/security/acme.nix | 2 | ||||
-rw-r--r-- | nixos/modules/security/dhparams.nix | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix index b50eeddfa40..dcadbce68aa 100644 --- a/nixos/modules/security/acme.nix +++ b/nixos/modules/security/acme.nix @@ -2,6 +2,7 @@ with lib; let cfg = config.security.acme; + opt = options.security.acme; # Used to calculate timer accuracy for coalescing numCerts = length (builtins.attrNames cfg.certs); @@ -485,6 +486,7 @@ let email = mkOption { type = types.nullOr types.str; default = cfg.email; + defaultText = literalExpression "config.${opt.email}"; description = "Contact email address for the CA to be able to reach you."; }; diff --git a/nixos/modules/security/dhparams.nix b/nixos/modules/security/dhparams.nix index 012be2887d8..cfa9003f12f 100644 --- a/nixos/modules/security/dhparams.nix +++ b/nixos/modules/security/dhparams.nix @@ -1,8 +1,9 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: let - inherit (lib) mkOption types; + inherit (lib) literalExpression mkOption types; cfg = config.security.dhparams; + opt = options.security.dhparams; bitType = types.addCheck types.int (b: b >= 16) // { name = "bits"; @@ -13,6 +14,7 @@ let options.bits = mkOption { type = bitType; default = cfg.defaultBitSize; + defaultText = literalExpression "config.${opt.defaultBitSize}"; description = '' The bit size for the prime that is used during a Diffie-Hellman key exchange. |