# Simple home router configuration # Provides WAN DHCP connection and LAN with NAT { config, pkgs, ... }: { imports = [ ../modules ]; # Enable Nix-NOS nix-nos.enable = true; # WAN interface - DHCP from ISP nix-nos.interfaces.wan = { dhcp = true; }; # LAN interface - Static IP for local network nix-nos.interfaces.lan = { addresses = [ "192.168.1.1/24" ]; }; # Enable IP forwarding for routing nix-nos.network.enableIpForwarding = true; # NAT configuration for internet sharing networking.nat = { enable = true; externalInterface = "wan"; internalInterfaces = [ "lan" ]; }; # DHCP server for LAN clients services.dnsmasq = { enable = true; settings = { interface = "lan"; dhcp-range = [ "192.168.1.100,192.168.1.200,24h" ]; dhcp-option = [ "option:router,192.168.1.1" ]; }; }; }