mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 02:25:12 -05:00
feat: smtp test
This commit is contained in:
parent
2cddd7b561
commit
2f5d7291c0
5 changed files with 87 additions and 73 deletions
|
@ -2,16 +2,14 @@
|
|||
flake,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(flake.config.services.instances)
|
||||
vaultwarden
|
||||
web
|
||||
;
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.services.instances) smtp vaultwarden web;
|
||||
service = vaultwarden;
|
||||
localhost = web.localhost.address0;
|
||||
host = "${service.subdomain}.${web.domains.url0}";
|
||||
in {
|
||||
in
|
||||
{
|
||||
services = {
|
||||
vaultwarden = {
|
||||
backupDir = service.paths.path0;
|
||||
|
@ -25,9 +23,9 @@ in {
|
|||
SMTP_AUTH_MECHANISM = "Plain";
|
||||
SMTP_EMBED_IMAGES = true;
|
||||
SMTP_FROM = service.email.address0;
|
||||
SMTP_FROM_NAME = "Vaultwarden";
|
||||
SMTP_HOST = "smtp.protonmail.ch";
|
||||
SMTP_PORT = 587;
|
||||
SMTP_FROM_NAME = service.label;
|
||||
SMTP_HOST = smtp.hostname;
|
||||
SMTP_PORT = smtp.ports.port0;
|
||||
SMTP_SECURITY = "starttls";
|
||||
SMTP_USERNAME = service.email.address0;
|
||||
|
||||
|
@ -64,24 +62,26 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
sops = let
|
||||
sopsPath = secret: {
|
||||
path = "${service.sops.path0}/${service.name}-${secret}";
|
||||
owner = service.name;
|
||||
mode = "600";
|
||||
sops =
|
||||
let
|
||||
sopsPath = secret: {
|
||||
path = "${service.sops.path0}/${service.name}-${secret}";
|
||||
owner = service.name;
|
||||
mode = "600";
|
||||
};
|
||||
in
|
||||
{
|
||||
secrets = builtins.listToAttrs (
|
||||
map
|
||||
(secret: {
|
||||
name = "${service.name}/${secret}";
|
||||
value = sopsPath secret;
|
||||
})
|
||||
[
|
||||
"env"
|
||||
]
|
||||
);
|
||||
};
|
||||
in {
|
||||
secrets = builtins.listToAttrs (
|
||||
map
|
||||
(secret: {
|
||||
name = "${service.name}/${secret}";
|
||||
value = sopsPath secret;
|
||||
})
|
||||
[
|
||||
"env"
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z ${service.paths.path0} 0755 ${service.name} ${service.name} -"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue