add mail i guess for some reason im doing this LMAO
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
...
|
||||
}: let
|
||||
cfg = config.holocron.zfs;
|
||||
sec = config.sops.secrets;
|
||||
|
||||
in {
|
||||
options.holocron.zfs = {
|
||||
enable = lib.mkEnableOption "enables zfs";
|
||||
@@ -22,7 +24,7 @@ in {
|
||||
boot.kernelParams = [ "zfs.zfs_arc_max=12884901888" ];
|
||||
|
||||
# pools to import
|
||||
#boot.zfs.extraPools = [ "holocron" ];
|
||||
#boot.zfs.extraPools = [ "holocron" ];
|
||||
|
||||
# enable smart monitoring
|
||||
services.smartd = {
|
||||
@@ -41,7 +43,7 @@ in {
|
||||
autoScrub.interval = "weekly";
|
||||
# email notifs
|
||||
zed = {
|
||||
enableMail = true;
|
||||
#enableMail = true;
|
||||
settings = {
|
||||
ZED_EMAIL_ADDR = ["root"];
|
||||
# send notification if scrub succeeds
|
||||
@@ -52,5 +54,43 @@ in {
|
||||
|
||||
# install userspace tools for smart
|
||||
environment.systemPackages = with pkgs; [smartmontools];
|
||||
|
||||
|
||||
# mail test
|
||||
|
||||
services.mail.sendmailSetuidWrapper.enable = true;
|
||||
|
||||
programs.msmtp = {
|
||||
enable = true;
|
||||
setSendmail = true;
|
||||
|
||||
defaults = {
|
||||
aliases = "/etc/aliases";
|
||||
port = 587;
|
||||
auth = "plain";
|
||||
tls = "on";
|
||||
tls_starttls = "on";
|
||||
};
|
||||
|
||||
accounts.default = {
|
||||
host = "mtp.mail.me.com";
|
||||
user = "bdhelderman@icloud.com";
|
||||
from = "bdhelderman@icloud.com";
|
||||
passwordeval = "cat ${sec."email_pass".path}";
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc.aliases.text = ''
|
||||
root: me@blakedheld.xyz
|
||||
blake: me@blakedheld.xyz
|
||||
'';
|
||||
|
||||
sops.secrets = {
|
||||
"email_pass" = {
|
||||
owner = "blake";
|
||||
group = "blake";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user