62 lines
1.8 KiB
Nix
62 lines
1.8 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
eulaFile = builtins.toFile "eula.txt" ''
|
|
# eula.txt managed by NixOS Configuration
|
|
eula=true
|
|
'';
|
|
in {
|
|
imports =
|
|
[
|
|
./hardware-configuration.nix
|
|
../../configuration/proxmox-vm
|
|
];
|
|
|
|
boot.loader.grub.enable = true;
|
|
boot.loader.grub.version = 2;
|
|
boot.loader.grub.device = "/dev/sda";
|
|
|
|
networking.hostName = "minecraft-2";
|
|
|
|
networking.useDHCP = false;
|
|
networking.interfaces.ens19.ipv4.addresses = [ { address = "192.168.10.31"; prefixLength = 24; } ];
|
|
networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffcb::9"; prefixLength = 64; } ];
|
|
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens19"; };
|
|
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" ];
|
|
|
|
clerie.minecraft-server.servers.aerilon.enable = true; # port 25565
|
|
clerie.minecraft-server.servers.riese.enable = true; # port 25566
|
|
clerie.minecraft-server.servers.chaos.enable = true; # port 25568
|
|
|
|
networking.firewall.allowedTCPPorts = [ 25565 25566 25568 ];
|
|
|
|
services.borgbackup.jobs = {
|
|
main = {
|
|
paths = [
|
|
"/var/src"
|
|
"/var/lib"
|
|
];
|
|
doInit = true;
|
|
repo = "borg@backup.clerie.de:." ;
|
|
encryption = {
|
|
mode = "repokey-blake2";
|
|
passCommand = "cat /var/src/secrets/borg/main";
|
|
};
|
|
environment = { BORG_RSH = "ssh -i /var/src/secrets/ssh/borg-main"; };
|
|
compression = "auto,lzma";
|
|
startAt = "hourly";
|
|
};
|
|
};
|
|
|
|
clerie.monitoring = {
|
|
enable = true;
|
|
id = "202";
|
|
pubkey = "n03aQ8dJZvxbYJUiNnbCkirOIc8R82RVrqkqNtgfAnc=";
|
|
};
|
|
|
|
system.stateVersion = "21.03";
|
|
}
|