mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -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
|
||||
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}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue