1
0
Fork 0

Add host backup-4

This commit is contained in:
clerie 2021-04-11 12:13:41 +02:00
parent cc38f3aa65
commit 548004b1a1
2 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,42 @@
{ 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/
retain daily 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/
'';
cronIntervals = {
daily = "15 6 * * * ";
};
};
clerie.monitoring = {
enable = true;
id = "205";
pubkey = "CLEF5hLdjwPqfU1oaM16fusJ705iNzUBxYsb4/YuGw4=";
};
system.stateVersion = "21.03";
}

View File

@ -0,0 +1,28 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/eb9bcb35-4f34-4cd6-b1b3-3a86de40571b";
fsType = "ext4";
};
fileSystems."/mnt/backup-4" =
{ device = "/dev/disk/by-uuid/f4d2a27d-664b-45f7-abc2-adf6691ad363";
fsType = "ext4";
};
swapDevices = [ ];
}