Add Last Update widget to Homepage via record-update script

record-update parses nvd diff after switch and writes latest.json;
Homepage polls a local-only nginx listener and renders date/changes/
closure/kernel via a customapi widget.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
ediblerope 2026-04-16 20:58:19 +01:00
parent 916c1d1c2d
commit f57c6e99ec
5 changed files with 76 additions and 1 deletions

View file

@ -65,6 +65,7 @@ in
systemd.tmpfiles.rules = [
"d /var/lib/homepage-custom-css 0755 fred users -"
"f /var/lib/homepage-custom-css/custom.css 0644 fred users -"
"d /var/lib/homepage-updates 0755 fred users -"
];
systemd.services.homepage-dashboard.serviceConfig.BindPaths = [
@ -257,6 +258,25 @@ in
icon = "go2rtc.png";
};
}
{
"Last Update" = {
description = "Most recent nixos-rebuild switch";
icon = "mdi-history";
widget = {
type = "customapi";
url = "http://127.0.0.1:8083/latest.json";
refreshInterval = 60000;
method = "GET";
display = "list";
mappings = [
{ field = "date"; label = "Date"; }
{ field = "changes"; label = "Changes"; }
{ field = "closure"; label = "Closure"; }
{ field = "kernel"; label = "Kernel"; }
];
};
};
}
];
}
];