Skip to content

Commit d9dc181

Browse files
committed
cfg/postfix.nix: factor out from base-medium.nix
I plan to use postfix in a headless system, and base-medium.nix is desktop oriented at the moment.
1 parent da9c570 commit d9dc181

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

cfg/base-medium.nix

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
./munin.nix
77
./desktop-gnome3.nix
88
./dictionary.nix
9+
./postfix.nix
910
./syncthing.nix
1011
./virtualisation.nix
1112
];
@@ -189,26 +190,6 @@
189190
# for hamster-time-tracker
190191
dbus.packages = with pkgs; [ gnome2.GConf ];
191192

192-
postfix = {
193-
enable = true;
194-
# Possibly set "domain" in machine specific configs.
195-
# The default "From:" address is
196-
# user@${config.networking.hostName}.localdomain
197-
#domain = "server1.example";
198-
rootAlias = "[email protected]";
199-
extraConfig = ''
200-
inet_interfaces = loopback-only
201-
202-
# Postfix (or my system) seems to prefer ipv6 now, but that breaks on
203-
# my network:
204-
#
205-
# connect to gmail-smtp-in.l.google.com[2a00:1450:4010:c09::1b]:25: Network is unreachable
206-
#
207-
# So let's force ipv4.
208-
smtp_address_preference = ipv4
209-
'';
210-
};
211-
212193
# Provide "MODE=666" or "MODE=664 + GROUP=plugdev" for a bunch of USB
213194
# devices, so that we don't have to run as root.
214195
udev.packages = with pkgs; [

cfg/postfix.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
services = {
3+
postfix = {
4+
enable = true;
5+
# Possibly set "domain" in machine specific configs.
6+
# The default "From:" address is
7+
# user@${config.networking.hostName}.localdomain
8+
#domain = "server1.example";
9+
rootAlias = "[email protected]";
10+
extraConfig = ''
11+
inet_interfaces = loopback-only
12+
13+
# Postfix (or my system) seems to prefer ipv6 now, but that breaks on
14+
# my network:
15+
#
16+
# connect to gmail-smtp-in.l.google.com[2a00:1450:4010:c09::1b]:25: Network is unreachable
17+
#
18+
# So let's force ipv4.
19+
smtp_address_preference = ipv4
20+
'';
21+
};
22+
};
23+
}

0 commit comments

Comments
 (0)