feat: fixed postgres backups

This commit is contained in:
Nick 2025-10-13 23:27:40 -05:00
parent 70379d5bed
commit 5d73a78115

View file

@ -1,4 +1,4 @@
{ flake, ... }:
{ flake, lib, ... }:
let
inherit (flake.config.machines.devices)
ceres
@ -53,9 +53,20 @@ in
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 = ''
if [ ! -d "${service.paths.path0}/15" ]; then
chown -R ${service.name}:${service.name} ${service.paths.path0}
fi
chown -R ${service.name}:${service.name} ${service.paths.path0}
'';
}