Notify of SMART errors via email
This commit is contained in:
parent
cbe77015ba
commit
24881e6195
|
@ -101,6 +101,7 @@ in {
|
|||
secrets.wireguard.file = secrets/wireguard.age;
|
||||
secrets.syncthing.file = secrets/syncthing.age;
|
||||
secrets.samba-ugent.file = secrets/samba-ugent.age;
|
||||
secrets.msmtp.file = secrets/msmtp.age;
|
||||
identityPaths = [ "/etc/ssh/id_ed25519" ];
|
||||
};
|
||||
|
||||
|
@ -159,6 +160,7 @@ in {
|
|||
./modules/printing.nix
|
||||
./modules/periodic.nix
|
||||
./modules/power.nix
|
||||
./modules/monitoring.nix
|
||||
./overlays/nix-direnv.nix
|
||||
./overlays/openconnect-sso.nix
|
||||
./overlays/cyrus-sasl-oauth2.nix
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Notify when a disk starts going haywire
|
||||
services.smartd = {
|
||||
enable = true;
|
||||
notifications.mail = {
|
||||
enable = true;
|
||||
sender = "akasroua+smartd@disroot.org";
|
||||
recipient = "akasroua@disroot.org";
|
||||
mailer = "${pkgs.msmtp}/bin/msmtp -t --read-envelope-from";
|
||||
};
|
||||
};
|
||||
|
||||
# Set up msmtp as notifier
|
||||
programs.msmtp = {
|
||||
enable = true;
|
||||
defaults = {
|
||||
port = 587;
|
||||
tls = true;
|
||||
};
|
||||
accounts = {
|
||||
default = {
|
||||
auth = true;
|
||||
host = "disroot.org";
|
||||
user = "akasroua@disroot.org";
|
||||
passwordeval =
|
||||
"${pkgs.coreutils}/bin/cat ${config.age.secrets.msmtp.path}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 G5UUhw yZ6q0+opG1dPd+bziS6EK4Da2R1HI4SN5CNZTFR0NFI
|
||||
xx6fet9CzAuWdwEzQrR7qc6DJZDPUM+Ug995OHJnO+w
|
||||
-> -ENU/-grease sB@d>Z >aJ<En""
|
||||
rUSbcqOSzKWJRomQ8uqM0L1wq1OeKtmbAXRtDhisJcSIg82+eIF2jwf8Id7tMEyk
|
||||
KrTfLHN7Ts9b/duzBrM9FDqm6pE9DqxUp652Tyo9ENa/
|
||||
--- 07ccdiEaTyEPofLC2xPqYeF3lkMMFiAM2g1MKqv2pwc
|
||||
ðÛ+4³/ǃTRÙ —¸§›ym¢*Öp×Þ~ÿ¢EÅg5vºÊ½ï•œêPn'µƒiÎÐ><3E>»°^$RðPºÃzSà!<´<>š¥>²è<1F>#ç˜ÏžýýhúéÀ
|
|
@ -5,4 +5,5 @@ in {
|
|||
"wireguard.age".publicKeys = [ coolneng ];
|
||||
"syncthing.age".publicKeys = [ coolneng ];
|
||||
"samba-ugent.age".publicKeys = [ coolneng ];
|
||||
"msmtp.age".publicKeys = [ coolneng ];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue