2023-10-09 08:43:53 +00:00
|
|
|
{
|
|
|
|
flake,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
networking.hostId = "34234773";
|
|
|
|
networking.hostName = "pie";
|
|
|
|
networking.defaultGateway = {
|
|
|
|
address = "192.168.178.1";
|
|
|
|
interface = "enabcm6e4ei0";
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.interfaces.enabcm6e4ei0.ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = "192.168.178.2";
|
|
|
|
prefixLength = 32;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
networking.interfaces.enabcm6e4ei0.ipv6.addresses = [
|
|
|
|
{
|
2023-10-21 21:16:35 +00:00
|
|
|
address = "2a02:908:5b1:e3c0:3077:2::";
|
2023-10-09 08:43:53 +00:00
|
|
|
prefixLength = 128;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
networking.hosts = flake.self.lib.addLocalHostname ["caddy.local"];
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
|
|
|
|
2023-10-11 18:42:59 +00:00
|
|
|
services.openssh.allowSFTP = true;
|
|
|
|
|
2023-10-09 08:43:53 +00:00
|
|
|
# Caddy reverse proxy for local services like cups
|
|
|
|
services.caddy = {
|
|
|
|
globalConfig = ''
|
2023-10-22 14:20:57 +00:00
|
|
|
default_bind 192.168.178.2 2a02:908:5b1:e3c0:3077:2:: 10.0.1.2 fd00:acab:1312:acab:2::
|
2023-10-09 08:43:53 +00:00
|
|
|
auto_https off
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|