diff --git a/hosts/luna/modules/monitoring/msmtp.nix b/hosts/luna/modules/monitoring/msmtp.nix new file mode 100644 index 00000000..b8c5749e --- /dev/null +++ b/hosts/luna/modules/monitoring/msmtp.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: +{ + programs.msmtp = { + enable = true; + defaults = { + port = 465; + tls = true; + tls_starttls = false; + aliases = pkgs.writeText "msmtp-aliases" '' + default: monitoring@price-hiller.com + ''; + allow_from_override = false; + }; + accounts.default = { + auth = true; + host = "smtp.purelymail.com"; + from = "%U.%H@${config.networking.domain}"; + from_full_name = "${config.networking.hostName}"; + user = "monitoring@${config.networking.domain}"; + passwordeval = "${pkgs.coreutils}/bin/cat ${config.age.secrets.mail-pass.path}"; + }; + }; +} \ No newline at end of file diff --git a/hosts/luna/modules/monitoring/smartd.nix b/hosts/luna/modules/monitoring/smartd.nix new file mode 100644 index 00000000..97c7a7c3 --- /dev/null +++ b/hosts/luna/modules/monitoring/smartd.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + services.smartd = { + enable = true; + notifications.mail.enable = true; + devices = [ + { + device = "/dev/nvme0"; + } + ]; + }; +} diff --git a/secrets b/secrets index f39f9c87..345e642d 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit f39f9c879ae7d9227f843a82155900234aa263a6 +Subproject commit 345e642d941aa814d591aade8db86a4d8fb76a42