Includes all pending changes needed for nixos-anywhere: - fiberlb: L7 policy, rule, certificate types - deployer: New service for cluster management - nix-nos: Generic network modules - Various service updates and fixes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
871 B
Nix
41 lines
871 B
Nix
# 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" ];
|
|
};
|
|
};
|
|
}
|