Theme btop and Homepage via matugen on the mediaserver

Share the wallpaper symlink across all hosts by moving it from gnome.nix
into home-manager/fred.nix, and add matugen templates for btop and the
Homepage dashboard.

The Homepage NixOS module writes custom.css into /etc (read-only), so
bind-mount /var/lib/homepage-custom-css/custom.css over it. A systemd
path unit restarts homepage-dashboard whenever matugen rewrites the
file, so regeneration works without sudo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ediblerope 2026-04-16 20:17:38 +01:00
parent 7d50716bc6
commit 2096330eb8
6 changed files with 171 additions and 4 deletions

View file

@ -60,6 +60,32 @@ in
{
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
# Writable location for matugen-generated custom.css; bind-mounted into
# the homepage service namespace over the Nix-managed /etc path.
systemd.tmpfiles.rules = [
"d /var/lib/homepage-custom-css 0755 fred users -"
"f /var/lib/homepage-custom-css/custom.css 0644 fred users -"
];
systemd.services.homepage-dashboard.serviceConfig.BindPaths = [
"/var/lib/homepage-custom-css/custom.css:/etc/homepage-dashboard/custom.css"
];
# Auto-restart homepage when matugen rewrites the custom.css
systemd.paths.homepage-css-reload = {
description = "Watch matugen custom.css for changes";
wantedBy = [ "multi-user.target" ];
pathConfig.PathChanged = "/var/lib/homepage-custom-css/custom.css";
};
systemd.services.homepage-css-reload = {
description = "Restart homepage after custom.css changes";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.systemd}/bin/systemctl restart homepage-dashboard.service";
};
};
# Oneshot service that extracts API keys and writes /etc/homepage-secrets
systemd.services.homepage-extract-secrets = {
description = "Extract API keys for Homepage dashboard";