1
0
nixfiles/hosts/porter/configuration.nix

79 lines
1.9 KiB
Nix
Raw Normal View History

2020-12-15 20:22:07 +01:00
{ config, pkgs, lib, ... }:
2020-12-15 12:59:27 +01:00
{
imports =
[
./hardware-configuration.nix
2020-12-15 20:22:07 +01:00
../../configuration/router
2020-12-15 12:59:27 +01:00
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda";
networking.hostName = "porter";
networking.useDHCP = false;
2020-12-15 20:22:07 +01:00
# Network
2021-02-03 18:46:20 +01:00
networking.interfaces.ens3.ipv4.addresses = [ { address = "5.45.100.191"; prefixLength = 22; } ];
networking.interfaces.ens3.ipv6.addresses = [ { address = "2a03:4000:6:48d::1"; prefixLength = 64; } ];
networking.defaultGateway = { address = "5.45.100.1"; interface = "ens3"; };
2020-12-15 12:59:27 +01:00
networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
2021-02-03 18:46:20 +01:00
networking.nameservers = [ "46.38.255.230" "46.38.252.230" ];
2020-12-15 12:59:27 +01:00
2022-09-28 22:47:52 +02:00
services.nginx.enable = true;
2022-12-05 20:45:00 +01:00
services.nginx.virtualHosts.default = lib.mkForce {};
services.nginx.virtualHosts."*.schule.clerie.de" = {
locations."/" = {
proxyPass = "http://schule.net.clerie.de";
2022-09-28 22:47:52 +02:00
};
};
2022-12-05 20:45:00 +01:00
services.sniproxy = {
enable = true;
config = ''
error_log {
filename /var/log/sniproxy/error.log
}
access_log {
filename /var/log/sniproxy/access.log
}
listen 443 {
proto tls
}
table {
^.*\.schule\.clerie\.de$ [2001:638:904:ffcb::d]
}
'';
};
2020-12-26 01:49:13 +01:00
clerie.nginx-port-forward = {
enable = true;
tcpPorts."2022" = {
host = "nonat.net.clerie.de";
port = 22;
};
};
services.chisel-server = {
2022-12-05 20:45:00 +01:00
enable = false;
host = "[::1]";
port = 3765;
authfile = "/var/src/secrets/chisel/users.json";
};
2021-07-23 23:32:33 +02:00
2022-09-29 17:36:16 +02:00
services.snowflake-proxy.enable = true;
2022-09-28 22:47:52 +02:00
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [];
2020-12-15 20:22:07 +01:00
2021-02-21 22:39:57 +01:00
clerie.monitoring = {
enable = true;
id = "102";
2021-02-24 00:16:54 +01:00
pubkey = "+mJN+ustPo2ehP0wqajYs3nTdJ0SPuIDyiZQSHFIK3o=";
blackbox = true;
2021-02-21 22:39:57 +01:00
};
2020-12-15 12:59:27 +01:00
system.stateVersion = "21.03";
}