aboutsummaryrefslogtreecommitdiff
path: root/modules/private/mail/opensmtpd.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-16 17:40:07 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-16 20:20:45 +0200
commit4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0 (patch)
tree9a7ede9ac3f1899074e9ef568a447f883191d3b5 /modules/private/mail/opensmtpd.nix
parentda30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2 (diff)
downloadNix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.gz
Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.tar.zst
Nix-4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0.zip
Use attrs for secrets instead of lists
Diffstat (limited to 'modules/private/mail/opensmtpd.nix')
-rw-r--r--modules/private/mail/opensmtpd.nix19
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;