hotspot test

This commit is contained in:
2026-04-25 08:55:08 -05:00
parent fdb71b0cc4
commit bb2811f238
2 changed files with 42 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
{ ... }: {
flake.nixosModules.hotspot = { config, lib, ... }: {
networking.firewall.interfaces."eno1" = {
allowedUDPPorts = [ 53 67 68 ];
allowedTCPPorts = [ 53 67 68 ];
};
networking = {
interfaces."eno1" = {
ipv4.addresses = [{ address = "192.168.121.1"; prefixLength = 24; }];
};
nat = {
enable = true;
internalInterfaces = [ "eno1" ];
externalInterface = "wlo1";
};
};
services.dnsmasq = {
enable = true;
settings = {
interface = "eno1";
dhcp-range = [ "192.168.121.2,192.168.121.10,1h" ];
};
};
networking.networkmanager.unmanaged = [ "eno1" ];
};
}

View File

@@ -7,8 +7,16 @@
allowedTCPPorts = [ 53 67 68 ];
};
networking.interfaces."wlo1" = {
ipv4.addresses = [{ address = "192.168.121.1"; prefixLength = 24; }];
networking = {
interfaces."wlo1" = {
ipv4.addresses = [{ address = "192.168.121.1"; prefixLength = 24; }];
};
nat = {
enable = true;
internalInterfaces = [ "wlo1" ];
externalInterface = "eno1";
};
};
services.dnsmasq = {