From d4a12c7953dbf002b5b6d0bd990f29b5342afc0e Mon Sep 17 00:00:00 2001 From: Dustin Frisch Date: Mon, 6 Nov 2023 15:40:07 +0100 Subject: [PATCH] Mail --- machines/manager/default.nix | 1 + machines/manager/mail.nix | 20 ++++++++++++++++++++ machines/manager/secrets.yaml | 6 ++++-- shared/slurm.nix | 4 ---- 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 machines/manager/mail.nix diff --git a/machines/manager/default.nix b/machines/manager/default.nix index 804bed4..828c277 100644 --- a/machines/manager/default.nix +++ b/machines/manager/default.nix @@ -12,6 +12,7 @@ with lib; ./ldap.nix ./users.nix ./nginx.nix + ./mail.nix #./beegfs.nix ./ntp.nix ./netinstall diff --git a/machines/manager/mail.nix b/machines/manager/mail.nix new file mode 100644 index 0000000..12beed4 --- /dev/null +++ b/machines/manager/mail.nix @@ -0,0 +1,20 @@ +{ config, ... }: + +{ + programs.msmtp = { + enable = true; + accounts = { + default = { + auth = true; + tls = true; + port = 587; + from = "fdhpc@informatik.hs-fulda.de"; + host = "smtp.hs-fulda.de"; + user = "fdhpc"; + passwordeval = "cat ${config.sops.secrets."mail/password".path}"; + }; + }; + }; + + sops.secrets."mail/password" = { }; +} diff --git a/machines/manager/secrets.yaml b/machines/manager/secrets.yaml index 97e63f4..73ccc5f 100644 --- a/machines/manager/secrets.yaml +++ b/machines/manager/secrets.yaml @@ -2,6 +2,8 @@ ldap: root: username: ENC[AES256_GCM,data:aXIFdQ==,iv:tdC7GFit0LrO4DJL3vbI6uKCDXeYAOwDGwvOqrvn9mM=,tag:x1mBwe+K+UKjCpGO5qKMuQ==,type:str] password: ENC[AES256_GCM,data:Q42VVdHaPZuvLR4HJ11CICpx61qTpw/v,iv:GhsXDsWxRinPOG+uMzy/uvxvMB1G8OKu4yH0a8achJc=,tag:yEWD4slZu/kDEV8ZJs43Hg==,type:str] +mail: + password: ENC[AES256_GCM,data:rpX5D5Fg3pvsQZWyo9bfk2KpbHD4Bo/R,iv:vuWI154d0J/peulEdB9eJLw784RjLjtcVgStaadKLf4=,tag:7BWaclC3TqsS1NGOmkE1SQ==,type:str] sops: kms: [] gcp_kms: [] @@ -26,8 +28,8 @@ sops: REQzSVBpb3lrOVFkcTF6SGtuN0VPRWsKfi/qLyhgOdDwudWztQTRQpcv5ITUEPeS zFA4aAzsDf91juywYXWsAmUq4L4WusfWb8Cf2hMTQLYLISb3mJXxlg== -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-06-27T09:57:35Z" - mac: ENC[AES256_GCM,data:QpMkI/w+J49DeQ0EDrz+6WtbtvJrgNChI1Z4PNNjdD2cik9wvtZNMUhjJVV18dUxWRH3dkhwX7Jt4mPhlDjhDspbkKsNjKaSApOS8AACybs8FqodvlUCU2mF+xG4beblQn3n8oPcqc5kjbAFc2r+mPSb4b7rcoS+xrB3rKUJTng=,iv:xsjx8Gz5UfpAXMEDEzMA4Kau4BI0vq3xvgfFvHS4uFo=,tag:aiFD1PXsHtiXFrx+legUhw==,type:str] + lastmodified: "2023-11-04T18:58:58Z" + mac: ENC[AES256_GCM,data:fFsTTPmvONkDVQ8mkOxJ6J0N1pbhtUXMspT9svzJYRMoKcEICEocUOEgS3Ucmn7hgx3v4+8prj3BYG1woA2pamgZ5+xI/UsZAOFHg2Wjdqm7OQ3AuK4Qf0uS8LMT9b3dKEddB9S4jVSn9klTou8m7gf1DM6esc2GBKh/zVi+ZtE=,iv:uFIc+S/JIQZHavT5hunvqmZi+zIUxsEj0VCN335opPE=,tag:kfQMv6skdQR/SCyTIQK1qA==,type:str] pgp: - created_at: "2023-07-03T09:54:56Z" enc: | diff --git a/shared/slurm.nix b/shared/slurm.nix index 3cab19a..d4e051c 100644 --- a/shared/slurm.nix +++ b/shared/slurm.nix @@ -18,10 +18,6 @@ with lib; "all Nodes=ALL AllowGroups=cluster Default=YES MaxTime=6:00:00 State=UP" "vip Nodes=ALL AllowGroups=vip Default=NO MaxTime=INFINITE State=UP" ]; - - extraConfig = '' - MailProg=${pkgs.coreutils}/bin/false - ''; }; services.munge = {