2024-10-03 11:26:39 -05:00
|
|
|
{ ... }:
|
2023-03-18 20:11:52 -05:00
|
|
|
let
|
2024-10-19 01:19:59 -05:00
|
|
|
dnsHosts = builtins.concatStringsSep "\n" [ "wiki.icdm.lan 10.42.101.1" ];
|
2023-03-18 20:11:52 -05:00
|
|
|
in
|
2023-03-07 17:17:24 -06:00
|
|
|
{
|
2024-10-03 11:26:39 -05:00
|
|
|
# If we have to do proxying in Bayonnais, we can start to work on that here
|
|
|
|
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
|
|
|
networking = {
|
|
|
|
|
hostName = "icdm-root";
|
|
|
|
|
useDHCP = false;
|
|
|
|
|
defaultGateway = "10.42.1.1";
|
2024-10-19 01:19:59 -05:00
|
|
|
nameservers = [
|
|
|
|
|
"100.100.100.100"
|
|
|
|
|
"10.42.1.2"
|
|
|
|
|
];
|
2024-10-03 11:26:39 -05:00
|
|
|
enableIPv6 = false;
|
2023-03-07 17:17:24 -06:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
interfaces = {
|
2024-10-19 01:19:59 -05:00
|
|
|
eno1.ipv4.addresses = [
|
|
|
|
|
{
|
|
|
|
|
address = "10.42.101.1";
|
|
|
|
|
prefixLength = 16;
|
|
|
|
|
}
|
2024-10-03 11:26:39 -05:00
|
|
|
{
|
|
|
|
|
address = "10.77.1.2";
|
|
|
|
|
prefixLength = 16;
|
2024-10-19 01:19:59 -05:00
|
|
|
}
|
|
|
|
|
];
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
|
|
|
|
# Allow traffic through
|
|
|
|
|
firewall = {
|
|
|
|
|
enable = true;
|
|
|
|
|
allowedTCPPorts = [ 53 ];
|
2024-10-19 01:19:59 -05:00
|
|
|
allowedUDPPorts = [
|
|
|
|
|
53
|
|
|
|
|
67
|
|
|
|
|
];
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
2023-03-18 20:11:52 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
extraHosts = "${dnsHosts}";
|
|
|
|
|
};
|
2023-03-18 20:11:52 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
services.dnsmasq = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
domain = "icdm.lan";
|
2024-10-19 01:19:59 -05:00
|
|
|
dhcp-range = [ "eno1,10.77.1.10,10.77.1.255,255.255.0.0,12h" ];
|
2024-10-03 11:26:39 -05:00
|
|
|
dhcp-option = [
|
|
|
|
|
"eno1,option:router,10.77.1.1"
|
|
|
|
|
"eno1,option:dns-server,10.77.1.2,1.1.1.1"
|
|
|
|
|
"eno1,option:domain-search,icdm.lan"
|
|
|
|
|
];
|
|
|
|
|
expand-hosts = true;
|
|
|
|
|
log-dhcp = true;
|
|
|
|
|
log-queries = true;
|
|
|
|
|
# Upstream servers
|
|
|
|
|
server = [
|
|
|
|
|
"1.1.1.1"
|
|
|
|
|
"8.8.4.4"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
2023-03-07 17:17:24 -06:00
|
|
|
}
|