diff options
Diffstat (limited to 'modules/private/mail/opensmtpd.nix')
-rw-r--r-- | modules/private/mail/opensmtpd.nix | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/modules/private/mail/opensmtpd.nix b/modules/private/mail/opensmtpd.nix index a7be066..e05bba9 100644 --- a/modules/private/mail/opensmtpd.nix +++ b/modules/private/mail/opensmtpd.nix | |||
@@ -1,17 +1,14 @@ | |||
1 | { lib, pkgs, config, name, ... }: | 1 | { lib, pkgs, config, name, ... }: |
2 | { | 2 | { |
3 | config = lib.mkIf config.myServices.mailRelay.enable { | 3 | config = lib.mkIf config.myServices.mailRelay.enable { |
4 | secrets.keys = [ | 4 | secrets.keys."opensmtpd/creds" = { |
5 | { | 5 | user = "smtpd"; |
6 | dest = "opensmtpd/creds"; | 6 | group = "smtpd"; |
7 | user = "smtpd"; | 7 | permissions = "0400"; |
8 | group = "smtpd"; | 8 | text = '' |
9 | permissions = "0400"; | 9 | eldiron ${name}:${config.hostEnv.ldap.password} |
10 | text = '' | 10 | ''; |
11 | eldiron ${name}:${config.hostEnv.ldap.password} | 11 | }; |
12 | ''; | ||
13 | } | ||
14 | ]; | ||
15 | users.users.smtpd.extraGroups = [ "keys" ]; | 12 | users.users.smtpd.extraGroups = [ "keys" ]; |
16 | services.opensmtpd = { | 13 | services.opensmtpd = { |
17 | enable = true; | 14 | enable = true; |