mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Configure Monit to watch sshfs mount
This commit is contained in:
parent
f174228d9f
commit
bd2cc9c3dc
3 changed files with 71 additions and 36 deletions
23
profiles/db.nix
Normal file
23
profiles/db.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../environment.nix
|
||||
../hardware/hcloud.nix
|
||||
../modules/openssh.nix
|
||||
../modules/postgresql.nix
|
||||
../modules/custom-backup-job.nix
|
||||
];
|
||||
|
||||
networking.firewall.interfaces."enp7s0".allowedTCPPorts = [ 5432 ];
|
||||
|
||||
services.custom-backup-job = {
|
||||
additionalReadWritePaths = [ "/nix/var/data/postgresql" ];
|
||||
additionalPreHook = ''
|
||||
${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
|
||||
'';
|
||||
startAt = "03:00";
|
||||
};
|
||||
|
||||
networking.firewall.interfaces."ens10".allowedTCPPorts = [ 80 ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue