mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
feat: added syncthing
This commit is contained in:
parent
7e84a2b77d
commit
1c65610138
2 changed files with 7 additions and 3 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue