diff --git a/machines/rigel/configuration.nix b/machines/rigel/configuration.nix index 8ce8924..b820028 100644 --- a/machines/rigel/configuration.nix +++ b/machines/rigel/configuration.nix @@ -8,7 +8,6 @@ "2bd36db8cc" # kurogeek-thinkpad ]; }) - # ./networking.nix ]; system.stateVersion = "25.11"; diff --git a/machines/rigel/networking.nix b/machines/rigel/networking.nix deleted file mode 100644 index 1381fc5..0000000 --- a/machines/rigel/networking.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ lib, config, ... }: -let - ata-interface = "enp2s0"; - - ipv6Subnet = lib.elemAt (lib.splitString "/" config.clan.core.vars.generators.yggdrasil.files.yggdrasil-subnet.value) 0; - ipv6Prefix = lib.elemAt (lib.splitString "/" config.clan.core.vars.generators.yggdrasil.files.yggdrasil-subnet.value) 1; -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 = ipv6Subnet + "1"; - prefixLength = lib.toInt ipv6Prefix; - } - ]; - ipv6.routes = [ - { - address = "200::"; - prefixLength = 7; - # via = "${ipv6Subnet}1"; - } - ]; - }; - }; - - 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.100,192.168.254.100,255.255.255.0,24h" - ]; - 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.100"; - }; - }; - }; - }; - - boot.kernel.sysctl = { - "net.ipv6.conf.all.forwarding" = true; - }; - - networking.firewall.allowedUDPPortRanges = [ - { - from = 10000; - to = 20000; - } - ]; - - networking.firewall.allowedUDPPorts = [ - 53 - 67 - ]; - networking.firewall.allowedTCPPorts = [ - 53 - 80 - 443 - ]; -}