Add firefly to sisko
Some checks failed
EVAL x86_64-linux.picard
BUILD x86_64-linux.picard
UPLOAD x86_64-linux.picard
DOWNLOAD x86_64-linux.picard
CACHIX x86_64-linux.picard
ATTIC x86_64-linux.picard
/ test (push) Successful in 2m48s

This commit is contained in:
Andrea Ciceri 2025-01-01 17:03:05 +01:00
parent 9590b879ed
commit 61fecf3bdb
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
4 changed files with 71 additions and 1 deletions

View file

@ -116,7 +116,7 @@
owner = "grafana";
group = "forgejo";
};
"firefly-app-key".owner = "firefly-iii";
};
};

View file

@ -32,6 +32,7 @@
"syncthing"
"atticd"
"jellyfin"
"firefly"
]
++ [
./disko.nix

View file

@ -15,6 +15,8 @@
"photos.aciceri.dev"
"status.aciceri.dev"
"jelly.aciceri.dev"
"firefly.aciceri.dev"
"import.firefly.aciceri.dev"
];
apiTokenFile = config.age.secrets.cloudflare-dyndns-api-token.path;
};

View file

@ -0,0 +1,67 @@
{ pkgs, config, ... }:
let
domain = "firefly.aciceri.dev";
domainImporter = "import.firefly.aciceri.dev";
dbUser = config.services.firefly-iii.user;
in
{
services.firefly-iii = {
enable = true;
package = pkgs.firefly-iii;
virtualHost = domain;
enableNginx = true;
settings = {
APP_ENV = "production";
APP_KEY_FILE = config.age.secrets.firefly-app-key.path;
SITE_OWNER = "andrea.ciceri@autistici.org";
DB_CONNECTION = "pgsql";
DEFAULT_LANGUAGE = "en_US";
TZ = "Europe/Rome";
};
};
services.firefly-iii-data-importer = {
enable = true;
enableNginx = true;
virtualHost = domainImporter;
settings = {
IGNORE_DUPLICATE_ERRORS = "false";
APP_ENV = "production";
APP_DEBUG = "false";
LOG_CHANNEL = "stack";
TRUSTED_PROXIES = "**";
TZ = "Europe/Rome";
FIREFLY_III_URL = "https://${domain}";
VANITY_URL = "https://${domain}";
};
};
imports = [ ../nginx-base ];
services.nginx.virtualHosts = {
${domain} = {
enableACME = true;
forceSSL = true;
};
${domainImporter} = {
enableACME = true;
forceSSL = true;
};
};
services.postgresql = {
ensureUsers = [
{
name = dbUser;
ensureDBOwnership = true;
ensureClauses.login = true;
}
];
ensureDatabases = [ dbUser ];
};
environment.persistence."/persist".directories = [
config.services.firefly-iii.dataDir
config.services.firefly-iii-data-importer.dataDir
];
}