Skip to content

Commit 69a8aba

Browse files
committed
nixos/opensmtpd: run nixfmt as requested by ci
1 parent fb4ff06 commit 69a8aba

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

nixos/modules/services/mail/opensmtpd.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,13 @@ in
113113
source = "${cfg.package}/bin/smtpctl";
114114
};
115115

116-
services.mail.sendmailSetuidWrapper = lib.mkIf cfg.setSendmail
117-
(security.wrappers.smtpctl // {
116+
services.mail.sendmailSetuidWrapper = lib.mkIf cfg.setSendmail (
117+
security.wrappers.smtpctl
118+
// {
118119
source = "${sendmail}/bin/sendmail";
119120
program = "sendmail";
120-
});
121+
}
122+
);
121123

122124
systemd.tmpfiles.rules = [
123125
"d /var/spool/smtpd 711 root - - -"

nixos/tests/opensmtpd.nix

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,26 @@ import ./make-test-python.nix {
1616
}
1717
];
1818
};
19-
environment.systemPackages = let
20-
testSendmail = pkgs.writeScriptBin "test-sendmail" ''
21-
#!/bin/sh
22-
set -euxo pipefail
23-
echo "========= SENDING" >&2
24-
${pkgs.system-sendmail}/bin/sendmail -v -f alice@smtp1 bob@smtp2 >&2 <<EOF
25-
From: alice@smtp1
26-
To: bob@smtp2
27-
Subject: Sendmail Test
19+
environment.systemPackages =
20+
let
21+
testSendmail = pkgs.writeScriptBin "test-sendmail" ''
22+
#!/bin/sh
23+
set -euxo pipefail
24+
echo "========= SENDING" >&2
25+
${pkgs.system-sendmail}/bin/sendmail -v -f alice@smtp1 bob@smtp2 >&2 <<EOF
26+
From: alice@smtp1
27+
To: bob@smtp2
28+
Subject: Sendmail Test
2829
29-
Hello World
30-
EOF
31-
echo "=========== FINISHED SENDING" >&2
32-
'';
33-
in [
34-
pkgs.opensmtpd
35-
testSendmail
36-
];
30+
Hello World
31+
EOF
32+
echo "=========== FINISHED SENDING" >&2
33+
'';
34+
in
35+
[
36+
pkgs.opensmtpd
37+
testSendmail
38+
];
3739
services.opensmtpd = {
3840
enable = true;
3941
extraServerArgs = [ "-v" ];

0 commit comments

Comments
 (0)