1
0
nixfiles/hosts/backup-4/configuration.nix
2021-04-11 17:37:27 +02:00

47 lines
1.3 KiB
Nix

{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
../../configuration/common
../../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/
rsync_short_args -rltD
retain alpha 14
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/
'';
# rsync_short_args
# -a -> -rlptgoD
# -rltD ist wie -a nur das alle Dateiberechtigungen und Besitzangabe ignoriert werden
cronIntervals = {
alpha = "15 6 * * * ";
};
};
clerie.monitoring = {
enable = true;
id = "205";
pubkey = "CLEF5hLdjwPqfU1oaM16fusJ705iNzUBxYsb4/YuGw4=";
};
system.stateVersion = "21.03";
}