1
0
nixfiles/hosts/backup-4/configuration.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

2021-04-11 12:13:41 +02:00
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
../../configuration/proxmox-vm
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/vda";
networking.hostName = "backup-4";
networking.useDHCP = false;
networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffcb::c"; prefixLength = 64; } ];
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" ];
services.rsnapshot = {
enable = true;
extraConfig = ''
snapshot_root /mnt/backup-4/
2021-04-11 17:37:27 +02:00
rsync_short_args -rltD
retain alpha 14
2021-04-11 12:13:41 +02:00
ssh_args -o BatchMode=yes -o IdentityFile=/var/src/secrets/rsnapshot/id_rsa
backup backup-replication@clerie-backup.net.clerie.de:/clerie-backup-replication/ clerie-backup/
'';
2021-04-11 17:37:27 +02:00
# rsync_short_args
# -a -> -rlptgoD
# -rltD ist wie -a nur das alle Dateiberechtigungen und Besitzangabe ignoriert werden
2021-04-11 12:13:41 +02:00
cronIntervals = {
2021-04-11 17:37:27 +02:00
alpha = "15 6 * * * ";
2021-04-11 12:13:41 +02:00
};
};
clerie.monitoring = {
enable = true;
id = "205";
pubkey = "CLEF5hLdjwPqfU1oaM16fusJ705iNzUBxYsb4/YuGw4=";
};
system.stateVersion = "21.03";
}