diff --git a/modules/nixos/services/postgresql/default.nix b/modules/nixos/services/postgresql/default.nix index dc84a70..c9ff489 100755 --- a/modules/nixos/services/postgresql/default.nix +++ b/modules/nixos/services/postgresql/default.nix @@ -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} ''; }