mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Configure Monit on all hosts
This commit is contained in:
parent
8d31683aa0
commit
5f36ab8644
6 changed files with 110 additions and 20 deletions
|
|
@ -6,6 +6,7 @@
|
|||
../modules/openssh.nix
|
||||
../modules/postgresql.nix
|
||||
../modules/custom-backup-job.nix
|
||||
../modules/custom-monit.nix
|
||||
];
|
||||
|
||||
networking.firewall.interfaces."enp7s0".allowedTCPPorts = [ 5432 ];
|
||||
|
|
@ -18,11 +19,12 @@
|
|||
};
|
||||
|
||||
services.custom-backup-job = {
|
||||
readWritePaths = [ "/nix/var/data/postgresql" ];
|
||||
readWritePaths = [ "/nix/var/data/postgresql" "/nix/var/data/backup/" ];
|
||||
preHook = ''
|
||||
${pkgs.postgresql_12}/bin/pg_dump -U synapse synapse > /nix/var/data/postgresql/synapse.dmp
|
||||
${pkgs.postgresql_12}/bin/pg_dump -U nextcloud nextcloud > /nix/var/data/postgresql/nextcloud.dmp
|
||||
'';
|
||||
postHook = "touch /nix/var/data/backup/backup-ok";
|
||||
startAt = "03:00";
|
||||
sshKey = config.sops.secrets.borgSshKey.path;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue