Nix configurations for my homelab

smartd: split into its own module and enable email notifications

yemou.pink 668002fc f8d16d97

verified
Changed files
+22 -6
lily
lutea
modules
+1
lily/config.nix
···
../modules/network-info.nix
../modules/nix.nix
../modules/remote-builder.nix
+
../modules/smartd.nix
../modules/services/caddy
../modules/services/caddy/atproto-did.nix
+1
lutea/config.nix
···
../modules/nix.nix
../modules/printing.nix
../modules/remote-builder.nix
+
../modules/smartd.nix
../modules/tools.nix
];
+1 -6
modules/basic.nix
···
};
security.polkit.enable = true;
-
-
services = {
-
acpid.enable = true;
-
# TODO: Setup email
-
smartd.enable = true;
-
};
+
services.acpid.enable = true;
systemd.network.enable = true;
networking = {
+19
modules/smartd.nix
···
+
{ config, ... }:
+
{
+
imports = [ ./msmtp.nix ];
+
+
services.smartd = {
+
enable = true;
+
extraOptions = [ "-i 7200" ];
+
# defaults.monitored = "-a -M test"; # Used for testing sendmail
+
notifications = {
+
wall.enable = false;
+
x11.enable = false;
+
mail = {
+
enable = true;
+
sender = "host-${config.networking.hostName}@y6d.boo";
+
recipient = "diagnostics@mou.pink";
+
};
+
};
+
};
+
}