2021-03-15 14:00:59 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
# Notify when a disk starts going haywire
|
|
|
|
services.smartd = {
|
|
|
|
enable = true;
|
2021-03-15 14:07:50 +01:00
|
|
|
autodetect = false;
|
|
|
|
devices = [ { device = "/dev/sda"; } { device = "/dev/sdb"; } ];
|
2021-03-15 14:00:59 +01:00
|
|
|
notifications.mail = {
|
|
|
|
enable = true;
|
|
|
|
recipient = "akasroua@gmail.com";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable trivial MTA for smartd notifications
|
|
|
|
services.ssmtp = {
|
|
|
|
enable = true;
|
|
|
|
useTLS = true;
|
|
|
|
useSTARTTLS = true;
|
|
|
|
domain = "gmail.com";
|
|
|
|
hostName = "smtp.gmail.com:587";
|
|
|
|
authUser = "akasroua@gmail.com";
|
|
|
|
authPassFile = "/var/keys/ssmtp";
|
|
|
|
};
|
|
|
|
}
|