1
0

hosts/clerie-backup,hosts/backup-4: add restic server backup nodes

This commit is contained in:
clerie 2023-04-30 19:24:18 +02:00
parent f8ab76d163
commit 56a34de0cb
4 changed files with 53 additions and 0 deletions

View File

@ -7,6 +7,7 @@
../../configuration/proxmox-vm ../../configuration/proxmox-vm
./backup.nix ./backup.nix
./restic-server.nix
]; ];
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
@ -20,6 +21,10 @@
networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ]; networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
services.nginx.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
clerie.monitoring = { clerie.monitoring = {
enable = true; enable = true;
id = "205"; id = "205";

View File

@ -0,0 +1,21 @@
{ ... }:
{
services.restic.server = {
enable = true;
privateRepos = true;
dataDir = "/mnt/backup-4/magenta";
listenAddress = "[::1]:43242";
};
services.nginx.virtualHosts."magenta.backup.clerie.de" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://[::1]:43242/";
extraConfig = ''
client_max_body_size 10G;
'';
};
};
}

View File

@ -5,6 +5,8 @@
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm ../../configuration/proxmox-vm
./restic-server.nix
]; ];
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
@ -20,6 +22,10 @@
networking.defaultGateway6 = { address = "2001:638:904:ffc1::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc1::1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ]; networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
services.nginx.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.borgbackup.repos = { services.borgbackup.repos = {
#clerie = { #clerie = {
# authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnUBblmmVoMMBftn4EnwnzqR12m9zill51LpO124hHb10K2rqxNoq8tYSc2pMkV/3briZovffpe5SzB+m2MnXbtOBstIEXkrPZQ78vaZ/nLh7+eWg30lCmMPwjf2wIjlTXkcbxbsi7FbPW7FsolGkU/0mqGhqK1Xft/g7SnCXIoGPSSrHMXEv5dPPofCa1Z0Un+98wQTVfOSKek6TnIsfLbG01UFQVkN7afE4dqSmMiWwEm2PK9l+OiBA2/QzDpbtu9wsfTol4c192vFEWR9crB2YZ1JlMbjVWHjYmB7NFsS0A6lUOikss0Y+LUWS2/QuM/kqybSo4rasZMAIazM6D clerie" ]; # authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnUBblmmVoMMBftn4EnwnzqR12m9zill51LpO124hHb10K2rqxNoq8tYSc2pMkV/3briZovffpe5SzB+m2MnXbtOBstIEXkrPZQ78vaZ/nLh7+eWg30lCmMPwjf2wIjlTXkcbxbsi7FbPW7FsolGkU/0mqGhqK1Xft/g7SnCXIoGPSSrHMXEv5dPPofCa1Z0Un+98wQTVfOSKek6TnIsfLbG01UFQVkN7afE4dqSmMiWwEm2PK9l+OiBA2/QzDpbtu9wsfTol4c192vFEWR9crB2YZ1JlMbjVWHjYmB7NFsS0A6lUOikss0Y+LUWS2/QuM/kqybSo4rasZMAIazM6D clerie" ];

View File

@ -0,0 +1,21 @@
{ ... }:
{
services.restic.server = {
enable = true;
privateRepos = true;
dataDir = "/mnt/clerie-backup/cyan";
listenAddress = "[::1]:43242";
};
services.nginx.virtualHosts."cyan.backup.clerie.de" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://[::1]:43242/";
extraConfig = ''
client_max_body_size 10G;
'';
};
};
}