Add a dashboard and backup download to the web UI

Metric history (5s to 1h tiers, persisted), uplink status, ping targets,
DHCP leases, and a tar.gz backup of the state directory.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
2026-10-29 13:34:21 +01:00
co-authored by Claude Sonnet 5.5
parent e684ddb06c
commit 2a111d012b
13 changed files with 1835 additions and 37 deletions
+7 -1
View File
@@ -66,6 +66,8 @@ let
webui = pkgs.callPackage ../../pkgs/router-webui/package.nix { };
in
{
imports = [ ./update.nix ];
# Outside `router`: the settings file defines that whole tree.
options.routerSettings = {
file = lib.mkOption {
@@ -154,7 +156,11 @@ in
description = "Router web UI";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
path = [ config.systemd.package ];
# iproute2: the dashboard reads the default route and the PPP peer.
path = [
config.systemd.package
pkgs.iproute2
];
serviceConfig = {
ExecStart = "${lib.getExe webui} -listen :${toString cfg.webui.port} -config ${cfg.directory} -state ${cfg.stateDirectory}";
Restart = "on-failure";