From 292e07689a012b40945f71409441a5813eaede4c Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 5 Nov 2014 02:42:12 +0300 Subject: ssmtp: add types to options --- nixos/modules/programs/ssmtp.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nixos') diff --git a/nixos/modules/programs/ssmtp.nix b/nixos/modules/programs/ssmtp.nix index 34eafd4fa846..a2cedb84321b 100644 --- a/nixos/modules/programs/ssmtp.nix +++ b/nixos/modules/programs/ssmtp.nix @@ -20,6 +20,7 @@ in networking.defaultMailServer = { directDelivery = mkOption { + type = types.bool; default = false; example = true; description = '' @@ -35,6 +36,7 @@ in }; hostName = mkOption { + type = types.str; example = "mail.example.org"; description = '' The host name of the default mail server to use to deliver @@ -43,6 +45,7 @@ in }; domain = mkOption { + type = types.str; default = ""; example = "example.org"; description = '' @@ -51,6 +54,7 @@ in }; useTLS = mkOption { + type = types.bool; default = false; example = true; description = '' @@ -60,6 +64,7 @@ in }; useSTARTTLS = mkOption { + type = types.bool; default = false; example = true; description = '' @@ -70,6 +75,7 @@ in }; authUser = mkOption { + type = types.str; default = ""; example = "foo@example.org"; description = '' @@ -78,6 +84,7 @@ in }; authPass = mkOption { + type = types.str; default = ""; example = "correctHorseBatteryStaple"; description = '' -- cgit 1.4.1 From 1b6f0ffb6e6e08bec48d8cf16bb8db719c1dfd79 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 5 Nov 2014 02:42:23 +0300 Subject: ssmtp: add 'root' option --- nixos/modules/programs/ssmtp.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nixos') diff --git a/nixos/modules/programs/ssmtp.nix b/nixos/modules/programs/ssmtp.nix index a2cedb84321b..7b00efbb4686 100644 --- a/nixos/modules/programs/ssmtp.nix +++ b/nixos/modules/programs/ssmtp.nix @@ -44,6 +44,15 @@ in ''; }; + root = mkOption { + type = types.str; + default = ""; + example = "root@example.org"; + description = '' + The e-mail to which mail for users with UID < 1000 is forwarded. + ''; + }; + domain = mkOption { type = types.str; default = ""; @@ -103,6 +112,7 @@ in '' MailHub=${cfg.hostName} FromLineOverride=YES + ${if cfg.root != "" then "root=${cfg.root}" else ""} ${if cfg.domain != "" then "rewriteDomain=${cfg.domain}" else ""} UseTLS=${if cfg.useTLS then "YES" else "NO"} UseSTARTTLS=${if cfg.useSTARTTLS then "YES" else "NO"} -- cgit 1.4.1