feat: added syncthing

This commit is contained in:
Nick 2025-10-10 00:14:36 -05:00
parent 7e84a2b77d
commit 1c65610138
2 changed files with 7 additions and 3 deletions

View file

@ -2,6 +2,7 @@
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
synologyName
@ -18,6 +19,9 @@ in
sops = {
path0 = "${sopsPath}/${name}";
};
paths = {
path0 = "${servicePath}/${name}";
};
domains = {
url0 = domain;
};

View file

@ -8,12 +8,13 @@ let
;
service = instances.postgresql;
backupPath = "${instances.syncthing.paths.path0}/postgres-backups";
in
{
services = {
postgresqlBackup = {
enable = true;
location = "${service.paths.path0}/backups";
location = backupPath;
compression = "zstd";
startAt = "*-*-* 07:00:00";
databases = [
@ -53,8 +54,7 @@ in
};
systemd.tmpfiles.rules = [
"Z ${service.paths.path0} 700 ${service.name} ${service.name} -"
"Z ${service.paths.path0}/backups 700 ${service.name} ${service.name} -"
"d ${backupPath} 0750 ${service.name} ${instances.syncthing.name} -"
];
users.users.${service.name}.extraGroups = [