feat(ami): set up msmtp to send email through forgejo later on

Currently not working as Hetzner is blocking the relevant ports.
This commit is contained in:
buffet 2024-05-02 12:51:56 +02:00
parent df5c9fb1b3
commit af533ec3bf
4 changed files with 28 additions and 0 deletions

View file

@ -16,6 +16,7 @@
./disk-config.nix ./disk-config.nix
./forgejo.nix ./forgejo.nix
./murmur.nix ./murmur.nix
./msmtp.nix
./website.nix ./website.nix
../../users/maintainer ../../users/maintainer

21
hosts/ami/msmtp.nix Normal file
View file

@ -0,0 +1,21 @@
{config, ...}: {
age.secrets.msmtppassword = {
file = ../../secrets/msmtppassword.age;
mode = "770";
owner = "forgejo";
group = "forgejo";
};
programs.msmtp = {
enable = true;
accounts.default = {
host = "smtp.fastmail.com";
domain = "buffets.kitchen";
tls = true;
tls_starttls = false;
auth = "plain";
user = "mail@buffet.sh";
passwordeval = "cat ${config.age.secrets.msmtppassword.path}";
};
};
}

View file

@ -3,4 +3,5 @@ let
in { in {
"secrets/bitwarden.age".publicKeys = [buffet]; "secrets/bitwarden.age".publicKeys = [buffet];
"secrets/borgpassword.age".publicKeys = [buffet]; "secrets/borgpassword.age".publicKeys = [buffet];
"secrets/msmtppassword.age".publicKeys = [buffet];
} }

View file

@ -0,0 +1,5 @@
age-encryption.org/v1
-> ssh-ed25519 zRvPWg jGsV1pjcJF/1DIYKxQuK8MVdtGb5j/AxUxPIgZkKPxo
/kCfvNexkWL49MmZztpnt6FDOHqiVi7OVh5k4HDmhG0
--- kHNbaMm2DRzSsCEPop4gXrKmBb/BSAG45xHeWyQfAkY
Ç¿8Ë* v—˜§xèHòqê [êz˜&½ì¸ ¯é½jÏŒŽ<C592>n,2±ã[™gø