full deprecation
This commit is contained in:
1 parent
a8fa1f83af
commit
1e6cf7251f
11 files changed
+130
-212
No files matched your search
@@ -174,7 +174,7 @@ Notes:
|
||||
- `env_file:` entries in the external file resolve **relative to**
|
||||
`/var/lib/container-services/<group>/`. Use absolute paths (e.g. another
|
||||
agenix secret path) or inline `environment:` instead.
|
||||
- Create the secret with `skyg encrypt <secret-name>`.
|
||||
- Create the secret with `skyg secrets edit <secret-name>`.
|
||||
|
||||
---
|
||||
|
||||
@@ -221,7 +221,7 @@ group starts; groups only reference it (`external: true`) and never create it.
|
||||
Internal DNS names are declared centrally in `skyg.internalNetworkingMap` (see
|
||||
`modules/main.nix`), not per service. Each app gets an internal name (`<name>` + `rootDns`,
|
||||
e.g. `drawdb.app.internal`) and an optional public alias, and the flake renders them into
|
||||
the OpenWrt router's `dnsmasq.conf` via `skyg openwrt`. **Nothing is configured on the host.**
|
||||
the OpenWrt router's `dnsmasq.conf` via `skyg build openwrt`. **Nothing is configured on the host.**
|
||||
|
||||
```nix
|
||||
# modules/main.nix
|
||||
@@ -247,8 +247,8 @@ Verify and deploy:
|
||||
|
||||
```sh
|
||||
nix eval .#dnsRecords --json | jq # every record
|
||||
skyg openwrt --dry-run # render dnsmasq.conf locally
|
||||
skyg openwrt # diff + confirm + apply
|
||||
skyg build openwrt --dry-run # render dnsmasq.conf locally
|
||||
skyg build openwrt # diff + confirm + apply
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -5,27 +5,28 @@ by the Rust-based generator in `modules/openwrt/generator/`.
|
||||
|
||||
## Contents
|
||||
|
||||
| File | Description |
|
||||
|---|---|
|
||||
| File | Description |
|
||||
| ------------ | --------------------------------------------------------------------- |
|
||||
| `glmain.nix` | Configuration for the `glmain` GL.iNet router (gateway at `10.0.0.1`) |
|
||||
|
||||
## How It Works
|
||||
|
||||
1. `glmain.nix` declares the router's network topology, firewall zones, DHCP, and DNS in Nix
|
||||
2. `modules/openwrt/default.nix` passes it through the generator binary
|
||||
3. `skyg openwrt` SSHes to the router and applies the generated UCI config
|
||||
3. `skyg build openwrt` SSHes to the router and applies the generated UCI config
|
||||
|
||||
## Deploying
|
||||
|
||||
```bash
|
||||
skyg openwrt
|
||||
skyg build openwrt # diff + confirm + apply
|
||||
skyg build openwrt --dry-run # render to .tmp/openwrt-<router>/ only
|
||||
```
|
||||
|
||||
## Adding a New Router
|
||||
|
||||
1. Create `openwrt-routers/<name>.nix` modelled on `glmain.nix`
|
||||
2. Add a `openwrt-<name>` package output in `flake.nix` using the `openwrt` helper
|
||||
3. Add a deploy target in `bin/lib/cmds.nu`
|
||||
3. Deploy with `skyg build openwrt <name>` (router names tab-complete from `openwrt-routers/*.nix`)
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ age -d secrets/glmain.json.age | openwrt-deploy
|
||||
is passed as a command-line argument (default `glmain`).
|
||||
|
||||
```bash
|
||||
skyg openwrt --dry-run
|
||||
skyg build openwrt --dry-run
|
||||
# → .tmp/openwrt-glmain/dnsmasq.conf
|
||||
# → .tmp/openwrt-glmain/dns-records.json # the Nix-rendered internalNetworkingMap fragment merged in
|
||||
# → .tmp/openwrt-glmain/ethers
|
||||
@@ -67,7 +67,7 @@ skyg openwrt --dry-run
|
||||
```
|
||||
|
||||
Use this to inspect what a deploy _would_ do (especially the firewall rules) before running
|
||||
the real `skyg openwrt`.
|
||||
the real `skyg build openwrt`.
|
||||
|
||||
`router.ip` / `router.user` are taken from the `config` passed into `default.nix`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user