Fix Firefly-iii mail service
This commit is contained in:
parent
391979bbb5
commit
fe227f8352
3 changed files with 21 additions and 11 deletions
|
|
@ -4,6 +4,9 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
p = import ../parameters.nix;
|
||||
in
|
||||
{
|
||||
|
||||
age.secrets = {
|
||||
|
|
@ -12,8 +15,8 @@
|
|||
owner = config.services.firefly-iii.user;
|
||||
group = config.services.firefly-iii.group;
|
||||
};
|
||||
firefly-iii-mailgun-key = {
|
||||
file = ../../secrets/firefly-iii-mailgun-key.age;
|
||||
scaleway-password = {
|
||||
file = ../../secrets/scaleway-password.age;
|
||||
owner = config.services.firefly-iii.user;
|
||||
group = config.services.firefly-iii.group;
|
||||
};
|
||||
|
|
@ -28,7 +31,8 @@
|
|||
services.firefly-iii = {
|
||||
enable = true;
|
||||
accessToken = config.age.secrets.firefly-iii-app-key.path;
|
||||
mailgun_key = config.age.secrets.firefly-iii-mailgun-key.path;
|
||||
mail_password_file = config.age.secrets.scaleway-password.path;
|
||||
proxy.domain = p.domains.public;
|
||||
};
|
||||
|
||||
virtualisation.proxmox.enable = true;
|
||||
|
|
|
|||
|
|
@ -23,12 +23,11 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
# age.secrets.firefly-iii-mailgun-key.file = ../../secrets/firefly-iii-mailgun-key.age;
|
||||
mailgun_key = lib.mkOption {
|
||||
mail_password_file = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = "";
|
||||
description = ''
|
||||
Mailgun API key for sending emails
|
||||
SMTP API key for sending emails
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
@ -82,7 +81,7 @@ in
|
|||
settings = {
|
||||
APP_ENV = "production";
|
||||
APP_URL = "https://${cfg.proxy.subdomain}.${cfg.proxy.domain}";
|
||||
SITE_OWNER = "davide@pasetto.me";
|
||||
SITE_OWNER = "admin@${cfg.proxy.domain}";
|
||||
DEFAULT_LANGUAGE = "en_US";
|
||||
TZ = "Europe/Rome";
|
||||
TRUSTED_PROXIES = "**";
|
||||
|
|
@ -98,9 +97,13 @@ in
|
|||
DB_DATABASE = dbName;
|
||||
DB_USERNAME = config.services.firefly-iii.user;
|
||||
|
||||
MAILGUN_ENDPOINT = "api.eu.mailgun.net";
|
||||
MAILGUN_DOMAIN = "pazpi.top";
|
||||
MAILGUN_SECRET_FILE = cfg.mailgun_key;
|
||||
MAIL_MAILER = "smtp";
|
||||
MAIL_HOST = "smtp.tem.scaleway.com";
|
||||
MAIL_PORT = 465;
|
||||
MAIL_FROM = "money@${cfg.proxy.domain}";
|
||||
MAIL_USERNAME = "5cbeeec0-9c3a-441a-9772-c11e9650fcd2";
|
||||
MAIL_PASSWORD_FILE = cfg.mail_password_file;
|
||||
MAIL_ENCRYPTION = "tls";
|
||||
|
||||
# Exactly 32 chars
|
||||
APP_KEY_FILE = cfg.accessToken;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,10 @@ let
|
|||
paperless-oauth2-client-secret = [ machines.paperless ];
|
||||
zigbee2mqtt-password = [ machines.zigbee2mqtt ];
|
||||
mqtt-password = [ machines.zigbee2mqtt ];
|
||||
scaleway-password = [ machines.forgejo ];
|
||||
scaleway-password = [
|
||||
machines.forgejo
|
||||
machines.firefly-iii
|
||||
];
|
||||
};
|
||||
in
|
||||
builtins.listToAttrs (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue