Services: enable email for smartd
This commit is contained in:
parent
5394097670
commit
58d4b5a1e5
|
@ -36,18 +36,28 @@ in
|
||||||
|
|
||||||
###*** Configure your system below this line. ***###
|
###*** Configure your system below this line. ***###
|
||||||
|
|
||||||
# Enable dynamic DNS with Porkbun
|
services = {
|
||||||
services.ddclient = {
|
# Enable dynamic DNS with Porkbun
|
||||||
enable = true;
|
ddclient = {
|
||||||
configFile = pkgs.writeText "ddclient.conf" ''
|
enable = true;
|
||||||
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
|
configFile = pkgs.writeText "ddclient.conf" ''
|
||||||
protocol=porkbun
|
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
|
||||||
apikey=${config.secrets.networking.porkbun.api.apiKey}
|
protocol=porkbun
|
||||||
secretapikey=${config.secrets.networking.porkbun.api.secretKey}
|
apikey=${config.secrets.networking.porkbun.api.apiKey}
|
||||||
*.${config.secrets.networking.domains.primary},*.${config.secrets.networking.domains.blog}
|
secretapikey=${config.secrets.networking.porkbun.api.secretKey}
|
||||||
cache=/tmp/ddclient.cache
|
*.${config.secrets.networking.domains.primary},*.${config.secrets.networking.domains.blog}
|
||||||
pid=/var/run/ddclient.pid
|
cache=/tmp/ddclient.cache
|
||||||
'';
|
pid=/var/run/ddclient.pid
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Monitor RAID drives using SMART
|
||||||
|
smartd.devices = [
|
||||||
|
{ device = "/dev/sda"; }
|
||||||
|
{ device = "/dev/sdb"; }
|
||||||
|
{ device = "/dev/sdc"; }
|
||||||
|
{ device = "/dev/sdd"; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure the system.
|
# Configure the system.
|
||||||
|
|
|
@ -58,7 +58,15 @@ in
|
||||||
smartd = {
|
smartd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autodetect = true;
|
autodetect = true;
|
||||||
notifications.wall.enable = true;
|
notifications = {
|
||||||
|
wall.enable = true;
|
||||||
|
mail = lib.mkIf config.aux.system.services.msmtp.enable {
|
||||||
|
enable = true;
|
||||||
|
mailer = "/run/wrappers/bin/sendmail";
|
||||||
|
sender = "${config.networking.hostName}@${config.secrets.networking.domains.primary}";
|
||||||
|
recipient = config.secrets.users.aires.email;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue