mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 13:32:15 -06:00
feat: added firefly-iii
This commit is contained in:
parent
2611ebfa61
commit
e4f47ef2b2
1 changed files with 17 additions and 24 deletions
|
|
@ -2,9 +2,6 @@
|
||||||
let
|
let
|
||||||
inherit (flake.config.services.instances) firefly-iii;
|
inherit (flake.config.services.instances) firefly-iii;
|
||||||
inherit (flake.config.machines.devices) ceres;
|
inherit (flake.config.machines.devices) ceres;
|
||||||
inherit (flake.config.people) user0;
|
|
||||||
inherit (flake.config.people.users.${user0}) email;
|
|
||||||
# localhost = "${ceres.ip.addess0}:${service.ports.port0}";
|
|
||||||
host = service.domains.url0;
|
host = service.domains.url0;
|
||||||
service = firefly-iii;
|
service = firefly-iii;
|
||||||
in
|
in
|
||||||
|
|
@ -13,10 +10,8 @@ in
|
||||||
firefly-iii = {
|
firefly-iii = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = service.paths.path0;
|
dataDir = service.paths.path0;
|
||||||
virtualHost = host;
|
|
||||||
poolConfig = {
|
poolConfig = {
|
||||||
"listen.owner" = config.services.caddy.user;
|
"listen.owner" = config.services.caddy.user;
|
||||||
"listen.group" = config.services.caddy.group;
|
|
||||||
"pm" = "dynamic";
|
"pm" = "dynamic";
|
||||||
"pm.max_children" = 32;
|
"pm.max_children" = 32;
|
||||||
"pm.start_servers" = 2;
|
"pm.start_servers" = 2;
|
||||||
|
|
@ -25,10 +20,10 @@ in
|
||||||
"pm.max_requests" = 500;
|
"pm.max_requests" = 500;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
DB_CONNECTION = "sqlite";
|
DB_CONNECTION = "pgsql";
|
||||||
APP_URL = "https://${host}";
|
APP_URL = "https://${host}";
|
||||||
APP_KEY_FILE = config.sops.secrets."${service.name}-pass".path;
|
APP_KEY_FILE = config.sops.secrets."${service.name}-pass".path;
|
||||||
SITE_OWNER = email.address0;
|
DB_PASSWORD_FILE = config.sops.secrets."${service.name}-data".path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
firefly-iii-data-importer = {
|
firefly-iii-data-importer = {
|
||||||
|
|
@ -39,9 +34,12 @@ in
|
||||||
${host} = {
|
${host} = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
root * ${config.services.firefly-iii.package}/public
|
root * ${config.services.firefly-iii.package}/public
|
||||||
file_server
|
|
||||||
encode gzip
|
encode gzip
|
||||||
php_fastcgi unix//run/phpfpm/firefly-iii.sock
|
php_fastcgi unix/run/phpfpm/firefly-iii.sock {
|
||||||
|
try_files {path} /index.php?{query}
|
||||||
|
trusted_proxies private_ranges
|
||||||
|
}
|
||||||
|
file_server
|
||||||
tls ${service.ssl.cert} ${service.ssl.key}
|
tls ${service.ssl.cert} ${service.ssl.key}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -70,20 +68,16 @@ in
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
# fileSystems."/var/lib/${service.name}" = {
|
fileSystems."/var/lib/${service.name}" = {
|
||||||
# device = service.paths.path0;
|
device = service.paths.path0;
|
||||||
# fsType = "none";
|
fsType = "none";
|
||||||
# options = [
|
options = [
|
||||||
# "bind"
|
"bind"
|
||||||
# ];
|
];
|
||||||
# depends = [
|
depends = [
|
||||||
# ceres.storage0.mount
|
ceres.storage0.mount
|
||||||
# ];
|
];
|
||||||
# };
|
};
|
||||||
#
|
|
||||||
users.users.${service.name}.extraGroups = [
|
|
||||||
"caddy"
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
|
"Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
|
||||||
|
|
@ -94,7 +88,6 @@ in
|
||||||
firewall.allowedTCPPorts = [
|
firewall.allowedTCPPorts = [
|
||||||
8080
|
8080
|
||||||
8081
|
8081
|
||||||
5432
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue