2023-10-09 08:43:53 +00:00
|
|
|
{
|
|
|
|
flake,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
2023-11-08 00:16:00 +00:00
|
|
|
networking.useDHCP = lib.mkDefault false;
|
|
|
|
|
2023-10-09 08:43:53 +00:00
|
|
|
networking.hostId = "34234773";
|
|
|
|
networking.hostName = "pie";
|
|
|
|
networking.defaultGateway = {
|
|
|
|
address = "192.168.178.1";
|
|
|
|
interface = "enabcm6e4ei0";
|
|
|
|
};
|
|
|
|
|
2023-10-24 13:54:18 +00:00
|
|
|
networking.interfaces.enabcm6e4ei0 = {
|
2023-11-08 00:16:00 +00:00
|
|
|
ipv4.addresses = [
|
|
|
|
{ address = "192.168.178.2"; prefixLength = 32; }
|
|
|
|
];
|
|
|
|
ipv6.addresses = [
|
|
|
|
{ address = "2a02:908:5b1:e3c0:2::"; prefixLength = 128; }
|
|
|
|
{ address = "fe80::b12f:acab:1312:acab"; prefixLength = 128; }
|
|
|
|
];
|
2023-11-01 15:27:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
2023-10-09 08:43:53 +00:00
|
|
|
|
2023-10-24 15:56:14 +00:00
|
|
|
services.openssh.openFirewall = true;
|
2023-10-11 18:42:59 +00:00
|
|
|
|
2023-10-09 08:43:53 +00:00
|
|
|
# Caddy reverse proxy for local services like cups
|
|
|
|
services.caddy = {
|
|
|
|
globalConfig = ''
|
2023-11-06 20:43:48 +00:00
|
|
|
default_bind 192.168.178.2 2a02:908:5b1:e3c0:2:: 10.0.1.2 fd00:b12f:acab:1312:acab:2::
|
2023-11-01 15:27:29 +00:00
|
|
|
# auto_https off
|
|
|
|
email acme@benjaminbaedorf.eu
|
|
|
|
# acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
|
2023-10-09 08:43:53 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|