Files
nixos-router/migrations/2.jq
T
nilsandClaude Sonnet 5.5 caf2c6b26d Add DNS accounts, Let's Encrypt, password change, reboot, HTTP redirect
- router.dnsProviders: named accounts at DNS providers, used by dynamic
  DNS and certificates (ddclient and lego provider lists in
  pkgs/router-webui/providers.json). Schema 2 migrates router.ddns.
- router.acme: a Let's Encrypt certificate for the web UI via
  security.acme (DNS-01, resolver 1.1.1.1), served and reloaded by the
  web UI; Certificate page.
- Web UI: password change (web UI and root), reboot button, HTTP to HTTPS
  redirect (router.webui.httpPort), grouped menu.
- Latest kernel (linuxPackages_latest); 7.3 and 7.3.0 are the same kernel
  for the reboot hint.
- SPECS.md: wanted later (REST API, GraphQL, MCP).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
2026-10-30 19:27:49 +01:00

20 lines
1014 B
Plaintext

# The provider account of dynamic DNS (protocol, server, username,
# passwordFile) moves to `dnsProviders`, named after the protocol, so that
# certificates can use the same account. The secret file stays where it is.
if (.router.ddns // null) == null
or (.router.ddns.provider // null) != null
or ((.router.ddns | keys) - ["enable", "zone", "domains", "ipv4", "ipv6", "ssl", "interval"] | length) == 0
then .
else
(.router.ddns.protocol // "cloudflare") as $name
| .router.dnsProviders = ((.router.dnsProviders // {}) + {
($name): (
{type: $name}
+ (if .router.ddns.username != null then {username: .router.ddns.username} else {} end)
+ (if .router.ddns.server != null then {server: .router.ddns.server} else {} end)
+ (if .router.ddns.passwordFile != null then {secretFile: .router.ddns.passwordFile} else {} end)
)})
| .router.ddns.provider = $name
| del(.router.ddns.protocol, .router.ddns.server, .router.ddns.username, .router.ddns.passwordFile)
end