Skip to content

Commit

Permalink
Remove ap
Browse files Browse the repository at this point in the history
  • Loading branch information
clementd64 committed Aug 23, 2024
1 parent 5888e18 commit def3ed5
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions hosts/syra/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,15 @@
matchConfig.Name = "en*";
networkConfig.DHCP = "yes";
};

networks."10-wlan0-ap" = {
matchConfig = {
Name = "wlan0";
WLANInterfaceType = "ap";
};
networkConfig = {
Address = [ "192.168.200.1/24" ];
DHCPServer = true;
IPMasquerade = "ipv4";
IPv4Forwarding = true;
};
dhcpServerConfig = {
EmitDNS = true;
DNS = "1.1.1.1 1.0.0.1";
};
};
};

networking.firewall = {
interfaces."wlan0".allowedUDPPorts = [ 67 ];
extraCommands = ''
iptables -A nixos-fw -s 192.168.1.0/24 -p udp --dport 1900 -j ACCEPT
iptables -A nixos-fw -s 192.168.1.0/24 -p tcp --dport 7879 -j ACCEPT
'';
};

networking.nat = {
enable = true;
extraCommands = ''
iptables -t nat -A nixos-nat-post -s 192.168.200.0/24 -j MASQUERADE
'';
};

services.resolved.extraConfig = ''
DNS=2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google 8.8.8.8#dns.google 8.8.4.4#dns.google
'';
Expand Down

0 comments on commit def3ed5

Please sign in to comment.