2020-12-26 00:30:20 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../../configuration/common
|
|
|
|
../../configuration/router
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
boot.loader.grub.device = "/dev/sda";
|
|
|
|
|
|
|
|
networking.hostName = "gatekeeper";
|
|
|
|
|
|
|
|
networking.useDHCP = false;
|
|
|
|
# Network
|
|
|
|
networking.interfaces.ens3.ipv4.addresses = [ { address = "78.47.183.82"; prefixLength = 32; } ];
|
|
|
|
networking.interfaces.ens3.ipv6.addresses = [ { address = "2a01:4f8:c0c:15f1::1"; prefixLength = 64; } ];
|
|
|
|
networking.defaultGateway = { address = "172.31.1.1"; interface = "ens3"; };
|
|
|
|
networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
|
|
|
|
networking.nameservers = [ "213.133.98.98" "213.133.99.99" "213.133.100.100" ];
|
|
|
|
|
2020-12-26 01:50:50 +01:00
|
|
|
networking.nat = {
|
|
|
|
enable = true;
|
|
|
|
externalInterface = "ens3";
|
|
|
|
internalInterfaces = [ "wg-vpn" ];
|
|
|
|
internalIPs = [ "10.20.30.0/24" ];
|
|
|
|
};
|
|
|
|
|
2020-12-26 00:30:20 +01:00
|
|
|
networking.wireguard.enable = true;
|
|
|
|
networking.wireguard.interfaces = {
|
|
|
|
wg-vpn = {
|
|
|
|
ips = [ "2a01:4f8:c0c:15f1::8001/113" "10.20.30.1/24" ];
|
|
|
|
peers = [
|
|
|
|
{
|
|
|
|
# krypton
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8011/128" "10.20.30.11/32" ];
|
|
|
|
publicKey = "NA/vdmoKQ5bpPKKrRPUpI17bNPoviRXnZ61iV4Q1VUQ=";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
# krypton full
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8111/128" "10.20.30.111/32" ];
|
|
|
|
publicKey = "QGQHWwDE1XIeiReFcacLxin4Dqlz1pBXvttFnzBMJSY=";
|
|
|
|
}
|
|
|
|
{
|
2022-07-25 19:32:55 +02:00
|
|
|
# ceasium
|
2020-12-26 00:30:20 +01:00
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8012/128" "10.20.30.12/32" ];
|
2022-07-25 19:32:55 +02:00
|
|
|
publicKey = "tvWpYlaS3ItTWH9CZv4SHzXToIblJP2j+Mt1V+3cegM=";
|
2020-12-26 00:30:20 +01:00
|
|
|
}
|
|
|
|
{
|
|
|
|
# terra
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8014/128" "10.20.30.14/32" ];
|
|
|
|
publicKey = "peZ94x44sMRNqNxcaN+DI2UMwVFzugZjnnbqbxWcBEs=";
|
|
|
|
}
|
2021-10-22 22:00:27 +02:00
|
|
|
{
|
|
|
|
# e1mo
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8015/128" "10.20.30.15/32" ];
|
|
|
|
publicKey = "j+ao/TTTE2hThdqBtLQuC67QSaKXMhhWTky6MzkhrxY=";
|
|
|
|
}
|
2022-07-25 19:32:55 +02:00
|
|
|
{
|
|
|
|
# jannik
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8016/128" "10.20.30.16/32" ];
|
|
|
|
publicKey = "V6Kc++QmJ4RkLSWvcLj/KgbIafvi7URV6dOgFnKSAwM=";
|
|
|
|
}
|
2022-08-26 21:44:37 +02:00
|
|
|
{
|
|
|
|
# evey
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8017/128" "10.20.30.17/32" ];
|
|
|
|
publicKey = "DD18B0plaYuhHK+yJ1nlEv6EmM+Krw/alXmz+X3SI18=";
|
|
|
|
}
|
2020-12-26 00:30:20 +01:00
|
|
|
{
|
|
|
|
# palladium
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8103/128" "10.20.30.103/32" ];
|
|
|
|
publicKey = "kxn69ynVyPJeShsAlVz5Xnd7U74GmCAw181b0+/qj3k=";
|
|
|
|
}
|
2021-10-22 22:00:27 +02:00
|
|
|
#{
|
|
|
|
# allowedIPs = [ "2a01:4f8:c0c:15f1::8104/128" "10.20.30.104/32" ];
|
|
|
|
# publicKey = "k1eQINwZPRdIEhND5sKAcHMxEpz/Z+B/2ZCdLhHCG3w=";
|
|
|
|
#}
|
2022-07-25 19:32:55 +02:00
|
|
|
{
|
|
|
|
# vcp-bula-mon
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8105/128" "10.20.30.105/32" ];
|
|
|
|
publicKey = "6gi04ExLQnpwxmTzQwQz3AsPS+ujKmANh6+o0nAzJwM=";
|
|
|
|
}
|
2022-12-28 01:25:12 +01:00
|
|
|
{
|
|
|
|
# aluminium
|
|
|
|
allowedIPs = [ "2a01:4f8:c0c:15f1::8106/128" "10.20.30.106/32" ];
|
|
|
|
publicKey = "kuUeStBuU6d8PGFHFhP5pEvy0nuZ0TmScI8w7MOt0is=";
|
|
|
|
}
|
2020-12-26 00:30:20 +01:00
|
|
|
];
|
2020-12-26 10:17:31 +01:00
|
|
|
listenPort = 51820;
|
2020-12-26 00:30:20 +01:00
|
|
|
allowedIPsAsRoutes = false;
|
|
|
|
privateKeyFile = "/var/src/secrets/wireguard/wg-vpn";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-09-28 20:07:14 +02:00
|
|
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
2020-12-26 10:17:31 +01:00
|
|
|
|
2020-12-26 01:49:13 +01:00
|
|
|
clerie.nginx-port-forward = {
|
|
|
|
enable = true;
|
|
|
|
tcpPorts."443" = {
|
|
|
|
host = "localhost";
|
|
|
|
port = 22;
|
|
|
|
};
|
|
|
|
tcpPorts."2022" = {
|
|
|
|
host = "nonat.net.clerie.de";
|
|
|
|
port = 22;
|
|
|
|
};
|
2021-02-10 21:05:06 +01:00
|
|
|
# riese
|
|
|
|
tcpPorts."25566" = {
|
|
|
|
host = "minecraft-2.net.clerie.de";
|
|
|
|
port = 25566;
|
|
|
|
};
|
|
|
|
# chaos
|
|
|
|
tcpPorts."25568" = {
|
|
|
|
host = "minecraft-2.net.clerie.de";
|
|
|
|
port = 25568;
|
|
|
|
};
|
|
|
|
# aerilon
|
2021-02-06 18:54:51 +01:00
|
|
|
tcpPorts."25569" = {
|
|
|
|
host = "minecraft-2.net.clerie.de";
|
|
|
|
port = 25565;
|
|
|
|
};
|
2020-12-26 01:49:13 +01:00
|
|
|
};
|
|
|
|
|
2021-02-24 02:20:38 +01:00
|
|
|
clerie.monitoring = {
|
|
|
|
enable = true;
|
|
|
|
id = "101";
|
|
|
|
pubkey = "H9Pvx/BzwEMM7acT9mioT8zBD2Yn13L82EKKqdAfeGM=";
|
2022-10-31 22:54:06 +01:00
|
|
|
blackbox = true;
|
2021-02-24 02:20:38 +01:00
|
|
|
};
|
|
|
|
|
2020-12-26 00:30:20 +01:00
|
|
|
system.stateVersion = "21.03";
|
|
|
|
}
|