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,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
p = import ../parameters.nix;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
|
|
@ -12,8 +15,8 @@
|
||||||
owner = config.services.firefly-iii.user;
|
owner = config.services.firefly-iii.user;
|
||||||
group = config.services.firefly-iii.group;
|
group = config.services.firefly-iii.group;
|
||||||
};
|
};
|
||||||
firefly-iii-mailgun-key = {
|
scaleway-password = {
|
||||||
file = ../../secrets/firefly-iii-mailgun-key.age;
|
file = ../../secrets/scaleway-password.age;
|
||||||
owner = config.services.firefly-iii.user;
|
owner = config.services.firefly-iii.user;
|
||||||
group = config.services.firefly-iii.group;
|
group = config.services.firefly-iii.group;
|
||||||
};
|
};
|
||||||
|
|
@ -28,7 +31,8 @@
|
||||||
services.firefly-iii = {
|
services.firefly-iii = {
|
||||||
enable = true;
|
enable = true;
|
||||||
accessToken = config.age.secrets.firefly-iii-app-key.path;
|
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;
|
virtualisation.proxmox.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,11 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# age.secrets.firefly-iii-mailgun-key.file = ../../secrets/firefly-iii-mailgun-key.age;
|
mail_password_file = lib.mkOption {
|
||||||
mailgun_key = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Mailgun API key for sending emails
|
SMTP API key for sending emails
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -82,7 +81,7 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
APP_ENV = "production";
|
APP_ENV = "production";
|
||||||
APP_URL = "https://${cfg.proxy.subdomain}.${cfg.proxy.domain}";
|
APP_URL = "https://${cfg.proxy.subdomain}.${cfg.proxy.domain}";
|
||||||
SITE_OWNER = "davide@pasetto.me";
|
SITE_OWNER = "admin@${cfg.proxy.domain}";
|
||||||
DEFAULT_LANGUAGE = "en_US";
|
DEFAULT_LANGUAGE = "en_US";
|
||||||
TZ = "Europe/Rome";
|
TZ = "Europe/Rome";
|
||||||
TRUSTED_PROXIES = "**";
|
TRUSTED_PROXIES = "**";
|
||||||
|
|
@ -98,9 +97,13 @@ in
|
||||||
DB_DATABASE = dbName;
|
DB_DATABASE = dbName;
|
||||||
DB_USERNAME = config.services.firefly-iii.user;
|
DB_USERNAME = config.services.firefly-iii.user;
|
||||||
|
|
||||||
MAILGUN_ENDPOINT = "api.eu.mailgun.net";
|
MAIL_MAILER = "smtp";
|
||||||
MAILGUN_DOMAIN = "pazpi.top";
|
MAIL_HOST = "smtp.tem.scaleway.com";
|
||||||
MAILGUN_SECRET_FILE = cfg.mailgun_key;
|
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
|
# Exactly 32 chars
|
||||||
APP_KEY_FILE = cfg.accessToken;
|
APP_KEY_FILE = cfg.accessToken;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,10 @@ let
|
||||||
paperless-oauth2-client-secret = [ machines.paperless ];
|
paperless-oauth2-client-secret = [ machines.paperless ];
|
||||||
zigbee2mqtt-password = [ machines.zigbee2mqtt ];
|
zigbee2mqtt-password = [ machines.zigbee2mqtt ];
|
||||||
mqtt-password = [ machines.zigbee2mqtt ];
|
mqtt-password = [ machines.zigbee2mqtt ];
|
||||||
scaleway-password = [ machines.forgejo ];
|
scaleway-password = [
|
||||||
|
machines.forgejo
|
||||||
|
machines.firefly-iii
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue