mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Start migration to NixOS for storage1
This commit is contained in:
parent
09d2ac3f05
commit
86124dcd4a
19 changed files with 589 additions and 173 deletions
|
|
@ -10,13 +10,21 @@
|
|||
|
||||
networking.firewall.interfaces."enp7s0".allowedTCPPorts = [ 5432 ];
|
||||
|
||||
sops.secrets = {
|
||||
borgSshKey = {
|
||||
owner = config.services.borgbackup.jobs.data.user;
|
||||
key = "borg/client_keys/db1/private";
|
||||
};
|
||||
};
|
||||
|
||||
services.custom-backup-job = {
|
||||
additionalReadWritePaths = [ "/nix/var/data/postgresql" ];
|
||||
additionalPreHook = ''
|
||||
readWritePaths = [ "/nix/var/data/postgresql" ];
|
||||
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
|
||||
'';
|
||||
startAt = "03:00";
|
||||
sshKey = config.sops.secrets.borgSshKey.path;
|
||||
};
|
||||
|
||||
networking.firewall.interfaces."ens10".allowedTCPPorts = [ 80 ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue