From 4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 16 Oct 2021 17:40:07 +0200 Subject: Use attrs for secrets instead of lists --- modules/private/mail/opensmtpd.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'modules/private/mail/opensmtpd.nix') 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 @@ { lib, pkgs, config, name, ... }: { config = lib.mkIf config.myServices.mailRelay.enable { - secrets.keys = [ - { - dest = "opensmtpd/creds"; - user = "smtpd"; - group = "smtpd"; - permissions = "0400"; - text = '' - eldiron ${name}:${config.hostEnv.ldap.password} - ''; - } - ]; + secrets.keys."opensmtpd/creds" = { + user = "smtpd"; + group = "smtpd"; + permissions = "0400"; + text = '' + eldiron ${name}:${config.hostEnv.ldap.password} + ''; + }; users.users.smtpd.extraGroups = [ "keys" ]; services.opensmtpd = { enable = true; -- cgit v1.2.3