mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 21:42:16 -06:00
feat: fixed postgres backups
This commit is contained in:
parent
70379d5bed
commit
5d73a78115
1 changed files with 15 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ flake, ... }:
|
{ flake, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
ceres
|
ceres
|
||||||
|
|
@ -53,9 +53,20 @@ in
|
||||||
instances.syncthing.name
|
instances.syncthing.name
|
||||||
];
|
];
|
||||||
|
|
||||||
|
systemd.services = {
|
||||||
|
postgresqlBackup-firefly-iii = {
|
||||||
|
serviceConfig = {
|
||||||
|
Group = lib.mkForce instances.syncthing.name;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
postgresqlBackup-mastodon = {
|
||||||
|
serviceConfig = {
|
||||||
|
Group = lib.mkForce instances.syncthing.name;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
system.activationScripts.postgresCommands = ''
|
system.activationScripts.postgresCommands = ''
|
||||||
if [ ! -d "${service.paths.path0}/15" ]; then
|
chown -R ${service.name}:${service.name} ${service.paths.path0}
|
||||||
chown -R ${service.name}:${service.name} ${service.paths.path0}
|
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue