diff options
author | Matthieu Coudron <mattator@gmail.com> | 2018-09-08 18:45:29 +0900 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2018-09-23 23:22:39 +0200 |
commit | 9407b42f97dc7c40a9c3432982d0363d64081a98 (patch) | |
tree | 3f9fddf22760c6b6686f02bd3e8e8d197a2fcffe /modules/accounts | |
parent | 151f29a17a6027cd2bdbd8276ef79631a1a950f6 (diff) |
accounts.emails: adding gpg/signature modules
Diffstat (limited to 'modules/accounts')
-rw-r--r-- | modules/accounts/email.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix index a6e265c40c8..5b1b912f15f 100644 --- a/modules/accounts/email.nix +++ b/modules/accounts/email.nix @@ -6,6 +6,52 @@ let cfg = config.accounts.email; + gpgModule = types.submodule { + options = { + key = mkOption { + type = types.str; + description = '' + The key to use as listed in <command>gpg --list-keys</command>. + ''; + }; + + signByDefault = mkOption { + type = types.bool; + default = false; + description = "Sign messages by default."; + }; + + encryptByDefault = mkOption { + type = types.bool; + default = false; + description = "Encrypt outgoing messages by default."; + }; + }; + }; + + signatureModule = types.submodule { + options = { + text = mkOption { + type = types.str; + default = ""; + example = '' + -- + Luke Skywalker + May the force be with you. + ''; + description = '' + Signature content. + ''; + }; + + showSignature = mkOption { + type = types.enum [ "append" "attach" "none" ]; + default = "none"; + description = "Method to communicate the signature."; + }; + }; + }; + tlsModule = types.submodule { options = { enable = mkOption { @@ -237,6 +283,22 @@ let ''; }; + signature = mkOption { + type = signatureModule; + default = {}; + description = '' + Signature configuration. + ''; + }; + + gpg = mkOption { + type = types.nullOr gpgModule; + default = null; + description = '' + GPG configuration. + ''; + }; + smtp = mkOption { type = types.nullOr smtpModule; default = null; |