35 lines
696 B
Nix
35 lines
696 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with 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 = "${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 = "${coreutils}/bin/cat ${config.age.secrets.msmtp.path}";
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|