1
0
nixfiles/hosts/minecraft-2/configuration.nix

73 lines
1.9 KiB
Nix
Raw Normal View History

2021-02-06 18:53:21 +01:00
{ 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" ];
2021-02-10 19:10:26 +01:00
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 ];
2021-02-06 18:53:21 +01:00
2021-06-18 12:25:41 +02:00
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.backup = {
enable = true;
jobs = {
main = {
paths = [
"/var/lib"
];
};
2023-05-06 18:24:52 +02:00
};
};
2021-02-24 01:50:23 +01:00
clerie.monitoring = {
enable = true;
id = "202";
pubkey = "n03aQ8dJZvxbYJUiNnbCkirOIc8R82RVrqkqNtgfAnc=";
};
2021-02-06 18:53:21 +01:00
system.stateVersion = "21.03";
}