mob next [ci-skip] [ci skip] [skip ci]
lastFile:vars/per-machine/rigel/yggdrasil/yggdrasil-secret/secret
This commit is contained in:
79
machines/rigel/networking.nix
Normal file
79
machines/rigel/networking.nix
Normal file
@@ -0,0 +1,79 @@
|
||||
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;
|
||||
}
|
||||
];
|
||||
ipv6.routes = [
|
||||
{
|
||||
address = "fdab:c002:36cb::";
|
||||
prefixLength = 64;
|
||||
}
|
||||
{
|
||||
address = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user