alpha
Login
or
Join now
hermes.pds.lassul.us
/
superconfig
forked from
lass.pds.lassul.us/superconfig
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
exim-smarthost: nix fmt
author
lassulus
date
2 years ago
(Sep 27, 2024, 6:37 PM CEST)
commit
8c32c590
8c32c590d13e28b6e22b827830686cf3c6eafd1f
parent
a2b7bd33
a2b7bd33bca3c7135a5e1e7f53bbdbfc60010a3b
+79
-24
1 changed file
Expand all
Collapse all
Unified
Split
2configs
exim-smarthost.nix
+79
-24
2configs/exim-smarthost.nix
View file
Reviewed
···
1
1
-
{ self, config, lib, pkgs, ... }: let
1
1
+
{
2
2
+
self,
3
3
+
config,
4
4
+
lib,
5
5
+
pkgs,
6
6
+
...
7
7
+
}:
8
8
+
let
2
9
3
10
to = lib.concatStringsSep "," [
4
11
"lass@green.r"
5
12
];
6
13
7
7
-
mails = import "${config.krebs.secret.directory}/mails.nix"; # todo make this pure somehow
14
14
+
mails = [
15
15
+
];
8
16
9
9
-
in {
17
17
+
in
18
18
+
{
10
19
imports = [
11
20
self.inputs.stockholm.nixosModules.exim-smarthost
12
21
];
13
13
-
environment.systemPackages = [ pkgs.review-mail-queue ];
14
22
15
15
-
clanCore.secrets."lassul.us-dkim" = {
16
16
-
secrets."lassul.us.dkim.priv" = { };
17
17
-
facts."lassul.us.dkim.pub" = { };
18
18
-
generator.path = with pkgs; [ coreutils openssl ];
23
23
+
clanCore.facts.services."lassul.us-dkim" = {
24
24
+
secret."lassul.us.dkim.priv" = { };
25
25
+
public."lassul.us.dkim.pub" = { };
26
26
+
generator.path = with pkgs; [
27
27
+
coreutils
28
28
+
openssl
29
29
+
];
19
30
generator.script = ''
20
31
openssl genrsa -out "$secrets"/lassul.us.dkim.priv 2048
21
32
openssl rsa -in "$secrets"/lassul.us.dkim.priv -pubout -outform der 2>/dev/null | openssl base64 -A > "$facts"/lassul.us.dkim.pub
···
42
53
config.krebs.hosts.mors
43
54
config.krebs.hosts.xerxes
44
55
];
45
45
-
internet-aliases = map (from: { inherit from to; }) mails ++ [
46
46
-
];
56
56
+
internet-aliases =
57
57
+
map (from: { inherit from to; }) mails
58
58
+
++ [
59
59
+
];
47
60
system-aliases = [
48
48
-
{ from = "mailer-daemon"; to = "postmaster"; }
49
49
-
{ from = "postmaster"; to = "root"; }
50
50
-
{ from = "nobody"; to = "root"; }
51
51
-
{ from = "hostmaster"; to = "root"; }
52
52
-
{ from = "usenet"; to = "root"; }
53
53
-
{ from = "news"; to = "root"; }
54
54
-
{ from = "webmaster"; to = "root"; }
55
55
-
{ from = "www"; to = "root"; }
56
56
-
{ from = "ftp"; to = "root"; }
57
57
-
{ from = "abuse"; to = "root"; }
58
58
-
{ from = "noc"; to = "root"; }
59
59
-
{ from = "security"; to = "root"; }
60
60
-
{ from = "root"; to = "lass"; }
61
61
+
{
62
62
+
from = "mailer-daemon";
63
63
+
to = "postmaster";
64
64
+
}
65
65
+
{
66
66
+
from = "postmaster";
67
67
+
to = "root";
68
68
+
}
69
69
+
{
70
70
+
from = "nobody";
71
71
+
to = "root";
72
72
+
}
73
73
+
{
74
74
+
from = "hostmaster";
75
75
+
to = "root";
76
76
+
}
77
77
+
{
78
78
+
from = "usenet";
79
79
+
to = "root";
80
80
+
}
81
81
+
{
82
82
+
from = "news";
83
83
+
to = "root";
84
84
+
}
85
85
+
{
86
86
+
from = "webmaster";
87
87
+
to = "root";
88
88
+
}
89
89
+
{
90
90
+
from = "www";
91
91
+
to = "root";
92
92
+
}
93
93
+
{
94
94
+
from = "ftp";
95
95
+
to = "root";
96
96
+
}
97
97
+
{
98
98
+
from = "abuse";
99
99
+
to = "root";
100
100
+
}
101
101
+
{
102
102
+
from = "noc";
103
103
+
to = "root";
104
104
+
}
105
105
+
{
106
106
+
from = "security";
107
107
+
to = "root";
108
108
+
}
109
109
+
{
110
110
+
from = "root";
111
111
+
to = "lass";
112
112
+
}
61
113
];
62
114
};
63
115
krebs.iptables.tables.filter.INPUT.rules = [
64
64
-
{ predicate = "-p tcp --dport smtp"; target = "ACCEPT"; }
116
116
+
{
117
117
+
predicate = "-p tcp --dport smtp";
118
118
+
target = "ACCEPT";
119
119
+
}
65
120
];
66
121
67
122
security.acme.certs."mail.lassul.us" = {