33 lines
829 B
Nix
33 lines
829 B
Nix
{ ... }: {
|
|
|
|
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" ];
|
|
};
|
|
}
|