1.3 KiB
1.3 KiB
openwrt-routers/
Declarative OpenWrt router configurations, compiled to UCI (Unified Configuration Interface)
by the Rust-based generator in modules/openwrt/generator/.
Contents
| File | Description |
|---|---|
glmain.nix |
Configuration for the glmain GL.iNet router (gateway at 10.0.0.1) |
How It Works
glmain.nixdeclares the router's network topology, firewall zones, DHCP, and DNS in Nixmodules/openwrt/default.nixpasses it through the generator binaryskyg build openwrtSSHes to the router and applies the generated UCI config
Deploying
skyg build openwrt # diff + confirm + apply
skyg build openwrt --dry-run # render to .tmp/openwrt-<router>/ only
Adding a New Router
- Create
openwrt-routers/<name>.nixmodelled onglmain.nix - Add a
openwrt-<name>package output inflake.nixusing theopenwrthelper - Deploy with
skyg build openwrt <name>(router names tab-complete fromopenwrt-routers/*.nix)
Notes
- Router credentials are stored in
secrets/glmain.json.age - Do not hardcode passwords or PSKs in the
.nixfile — use agenix secrets