summaryrefslogtreecommitdiff
path: root/hosts/poweredge/notification-mailer.nix
blob: d8fddc7d42151eb16ab4851eceac2ab1ae3d5362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ config, ... }: let
	serverEmail = "server-notifications@tjkeller.xyz";
in {
	# Mailer password secret for mail application password
	sops.secrets.mailerPassword.sopsFile = ./resources/secrets/mailer-pass.yaml;

	# Enable mta for system event notifications
	services.mail._mailer = {
		sender = {
			host = "mail.tjkeller.xyz";
			user = serverEmail;
			from = serverEmail;
			passwordFile = config.sops.secrets.mailerPassword.path;
		};
		recipient = serverEmail;
	};

	# Enable zed mailer module
	services.zfs._zedMailer.enable = true;

	# Enable smartd notifications
	services.smartd.notifications.mail = {
		enable = true;
		sender = serverEmail;
		recipient = serverEmail;
	};
}