mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 13:32:15 -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
|
let
|
||||||
inherit (moduleFunctions.instancesFunctions)
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
domain0
|
domain0
|
||||||
|
servicePath
|
||||||
sslPath
|
sslPath
|
||||||
sopsPath
|
sopsPath
|
||||||
synologyName
|
synologyName
|
||||||
|
|
@ -18,6 +19,9 @@ in
|
||||||
sops = {
|
sops = {
|
||||||
path0 = "${sopsPath}/${name}";
|
path0 = "${sopsPath}/${name}";
|
||||||
};
|
};
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${name}";
|
||||||
|
};
|
||||||
domains = {
|
domains = {
|
||||||
url0 = domain;
|
url0 = domain;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,13 @@ let
|
||||||
;
|
;
|
||||||
|
|
||||||
service = instances.postgresql;
|
service = instances.postgresql;
|
||||||
|
backupPath = "${instances.syncthing.paths.path0}/postgres-backups";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
postgresqlBackup = {
|
postgresqlBackup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
location = "${service.paths.path0}/backups";
|
location = backupPath;
|
||||||
compression = "zstd";
|
compression = "zstd";
|
||||||
startAt = "*-*-* 07:00:00";
|
startAt = "*-*-* 07:00:00";
|
||||||
databases = [
|
databases = [
|
||||||
|
|
@ -53,8 +54,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"Z ${service.paths.path0} 700 ${service.name} ${service.name} -"
|
"d ${backupPath} 0750 ${service.name} ${instances.syncthing.name} -"
|
||||||
"Z ${service.paths.path0}/backups 700 ${service.name} ${service.name} -"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.${service.name}.extraGroups = [
|
users.users.${service.name}.extraGroups = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue