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

54
templates/btop.theme Normal file
View file

@ -0,0 +1,54 @@
# Matugen-generated btop theme based on wallpaper
theme[main_bg]="{{colors.surface.default.hex}}"
theme[main_fg]="{{colors.on_surface.default.hex}}"
theme[title]="{{colors.on_surface.default.hex}}"
theme[hi_fg]="{{colors.primary.default.hex}}"
theme[selected_bg]="{{colors.surface_container_high.default.hex}}"
theme[selected_fg]="{{colors.primary.default.hex}}"
theme[inactive_fg]="{{colors.on_surface_variant.default.hex}}"
theme[graph_text]="{{colors.on_surface.default.hex}}"
theme[meter_bg]="{{colors.surface_container.default.hex}}"
theme[proc_misc]="{{colors.tertiary.default.hex}}"
theme[cpu_box]="{{colors.outline.default.hex}}"
theme[mem_box]="{{colors.outline.default.hex}}"
theme[net_box]="{{colors.outline.default.hex}}"
theme[proc_box]="{{colors.outline.default.hex}}"
theme[div_line]="{{colors.outline_variant.default.hex}}"
theme[temp_start]="{{colors.tertiary.default.hex}}"
theme[temp_mid]="{{colors.secondary.default.hex}}"
theme[temp_end]="{{colors.error.default.hex}}"
theme[cpu_start]="{{colors.primary.default.hex}}"
theme[cpu_mid]="{{colors.secondary.default.hex}}"
theme[cpu_end]="{{colors.tertiary.default.hex}}"
theme[free_start]="{{colors.primary.default.hex}}"
theme[free_mid]="{{colors.secondary.default.hex}}"
theme[free_end]="{{colors.tertiary.default.hex}}"
theme[cached_start]="{{colors.primary.default.hex}}"
theme[cached_mid]="{{colors.secondary.default.hex}}"
theme[cached_end]="{{colors.tertiary.default.hex}}"
theme[available_start]="{{colors.primary.default.hex}}"
theme[available_mid]="{{colors.secondary.default.hex}}"
theme[available_end]="{{colors.tertiary.default.hex}}"
theme[used_start]="{{colors.primary.default.hex}}"
theme[used_mid]="{{colors.secondary.default.hex}}"
theme[used_end]="{{colors.tertiary.default.hex}}"
theme[download_start]="{{colors.primary.default.hex}}"
theme[download_mid]="{{colors.secondary.default.hex}}"
theme[download_end]="{{colors.tertiary.default.hex}}"
theme[upload_start]="{{colors.primary.default.hex}}"
theme[upload_mid]="{{colors.secondary.default.hex}}"
theme[upload_end]="{{colors.tertiary.default.hex}}"
theme[process_start]="{{colors.primary.default.hex}}"
theme[process_mid]="{{colors.secondary.default.hex}}"
theme[process_end]="{{colors.tertiary.default.hex}}"

69
templates/homepage.css Normal file
View file

@ -0,0 +1,69 @@
/* Matugen-generated Homepage theme based on wallpaper */
/* Background + text for the whole dashboard */
html, body, main, .information-widget {
background-color: {{colors.surface.default.hex}} !important;
color: {{colors.on_surface.default.hex}} !important;
}
/* Service and widget cards */
#information-widgets > *,
.services-group .service,
.bookmark-group .bookmark,
.information-widget-datetime,
.information-widget-resources,
.information-widget-search {
background-color: {{colors.surface_container.default.hex}} !important;
color: {{colors.on_surface.default.hex}} !important;
border-color: {{colors.outline_variant.default.hex}} !important;
}
/* Group headings */
h1, h2, h3, .services-group h2, .bookmark-group h2 {
color: {{colors.on_surface.default.hex}} !important;
}
/* Muted / secondary text */
.service-description, .bookmark-description,
.service .service-sub, .information-widget .label {
color: {{colors.on_surface_variant.default.hex}} !important;
}
/* Search input */
input, .search input[type="text"] {
background-color: {{colors.surface_container_high.default.hex}} !important;
color: {{colors.on_surface.default.hex}} !important;
border-color: {{colors.outline.default.hex}} !important;
}
/* Accent — used on highlights, progress bars, links */
a, .service a:hover, .bookmark a:hover,
.resources .resource .progress .progress-bar,
button:hover, .service-container:hover {
color: {{colors.primary.default.hex}} !important;
}
.resources .resource .progress .progress-bar,
.resources .resource .usage-bar-fill {
background-color: {{colors.primary.default.hex}} !important;
}
/* Dividers */
hr, .service-container, .bookmark-container {
border-color: {{colors.outline_variant.default.hex}} !important;
}
/* Override Tailwind's slate palette so built-in theme uses wallpaper colors */
:root {
--color-slate-50: {{colors.on_surface.default.hex}};
--color-slate-100: {{colors.on_surface.default.hex}};
--color-slate-200: {{colors.on_surface.default.hex}};
--color-slate-300: {{colors.on_surface_variant.default.hex}};
--color-slate-400: {{colors.on_surface_variant.default.hex}};
--color-slate-500: {{colors.outline.default.hex}};
--color-slate-600: {{colors.outline_variant.default.hex}};
--color-slate-700: {{colors.surface_container_high.default.hex}};
--color-slate-800: {{colors.surface_container.default.hex}};
--color-slate-900: {{colors.surface.default.hex}};
--color-slate-950: {{colors.surface.default.hex}};
}