71 lines
1.3 KiB
Nix
71 lines
1.3 KiB
Nix
let
|
|
ata-interface = "enp2s0";
|
|
in
|
|
{
|
|
# clan.core.vars.generators.networking.files.ata-interface.secret = false;
|
|
|
|
networking.interfaces = {
|
|
${ata-interface} = {
|
|
useDHCP = false;
|
|
ipv4.addresses = [
|
|
{
|
|
address = "192.168.254.1";
|
|
prefixLength = 24;
|
|
}
|
|
];
|
|
ipv6.addresses = [
|
|
{
|
|
address = "fdab:c002:36cb::1";
|
|
prefixLength = 64;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
services.dnsmasq = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
bind-interfaces = true;
|
|
server = [
|
|
"1.1.1.1"
|
|
"8.8.8.8"
|
|
];
|
|
# enable-ra = true;
|
|
domain-needed = true;
|
|
domain = "localhost";
|
|
dhcp-range = [
|
|
"192.168.254.10,192.168.254.240,255.255.255.0,24h"
|
|
"fdab:c002:36cb::10,fdab:c002:36cb::240,slaac"
|
|
];
|
|
dhcp-option = [
|
|
"3,192.168.254.1"
|
|
"6,8.8.8.8,8.8.4.4"
|
|
"option6:information-refresh-time,3600"
|
|
];
|
|
interface = [ ata-interface ];
|
|
};
|
|
};
|
|
|
|
services.nginx = {
|
|
enable = true;
|
|
virtualHosts = {
|
|
"_" = {
|
|
locations."/" = {
|
|
proxyPass = "http://192.168.254.96";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
networking.firewall.allowedUDPPorts = [
|
|
53
|
|
67
|
|
];
|
|
networking.firewall.allowedTCPPorts = [
|
|
53
|
|
80
|
|
443
|
|
];
|
|
}
|