stylix: full migration off matugen

Flips stylix.autoEnable on so every supported target picks up colours
from the wallpaper-derived base16 palette, and tears out the per-app
matugen plumbing it replaces:

- fred.nix: drop the matugen config.toml block and the .keep files;
  move btop and ghostty to programs.* with the colour-bearing options
  removed (stylix owns those).
- gnome.nix: remove the matugen and jq packages, the hand-written
  gtk.css home.file overrides (replaced by gtk.gtk{3,4}.extraCss layered
  on top of stylix's theme), the WallpaperShell user-themes override,
  and the gtk-theme/cursor-theme/accent-color dconf entries that stylix
  now writes.
- stylix.nix: add a home.activation hook that recolours Adwaita folder
  SVGs using stylix.colors.base0D and pulls in Papirus mimetypes —
  same outcome as the old matugen post-hook but driven by stylix.
- common.nix: drop the matugen invocation from the `update` alias.

Leftover matugen-only behaviour intentionally dropped: Vesktop CSS,
the GNOME accent hue-mapping, the VSCodium colour-merge (stylix's
vscode target handles that natively). Templates in templates/ are kept
on disk for now; can be removed in a follow-up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
ediblerope 2026-05-11 19:44:07 +01:00
parent 727eefb20a
commit 1bf08d2097
4 changed files with 150 additions and 163 deletions

View file

@ -18,15 +18,10 @@
gnomeExtensions.just-perfection
gnomeExtensions.appindicator
gnomeExtensions.hot-edge
gnomeExtensions.user-themes
#gnomeExtensions.rounded-window-corners-reborn
adwaita-icon-theme
gnome-themes-extra
adwaita-icon-theme-legacy
papirus-icon-theme
adw-gtk3
matugen
jq
];
# Set cursor theme
@ -40,12 +35,11 @@
];
};
# Set icon theme via dconf
# mutter VRR — stylix handles theme/icon dconf entries
programs.dconf.profiles.user.databases = [{
settings = {
"org/gnome/desktop/interface" = {
icon-theme = "WallpaperAdwaita";
cursor-theme = "Adwaita";
};
"org/gnome/mutter" = {
experimental-features = [ "variable-refresh-rate" ];
@ -63,61 +57,34 @@
programs.dconf.enable = true;
# Home Manager GNOME settings
home-manager.users.fred = { config, lib, ... }: {
# Minimal titlebars — hide window buttons and shrink headerbar
home.file.".config/gtk-4.0/gtk.css".force = true;
home.file.".config/gtk-4.0/gtk.css".text = ''
@import url("colors.css");
headerbar {
min-height: 0;
padding: 0;
margin: 0;
}
headerbar .title {
font-size: 0;
}
/* Keep wallpaper colors when window loses focus */
window:backdrop {
background-color: @window_bg_color;
color: @window_fg_color;
}
window:backdrop headerbar {
background-color: @headerbar_bg_color;
color: @headerbar_fg_color;
}
window:backdrop .navigation-sidebar,
window:backdrop .sidebar-pane {
background-color: @sidebar_bg_color;
color: @sidebar_fg_color;
}
window:backdrop .top-bar {
background-color: @headerbar_bg_color;
color: @headerbar_fg_color;
}
'';
home.file.".config/gtk-3.0/gtk.css".force = true;
home.file.".config/gtk-3.0/gtk.css".text = ''
@import url("colors.css");
headerbar {
min-height: 0;
padding: 0;
margin: 0;
}
headerbar .title {
font-size: 0;
}
'';
home-manager.users.fred = { config, lib, pkgs, ... }: {
# Minimal titlebars — stylix manages the GTK theme; we layer our
# headerbar shrink on top via programs.gtk.*.extraCss.
gtk = {
enable = true;
gtk3.extraCss = ''
headerbar { min-height: 0; padding: 0; margin: 0; }
headerbar .title { font-size: 0; }
'';
gtk4.extraCss = ''
headerbar { min-height: 0; padding: 0; margin: 0; }
headerbar .title { font-size: 0; }
window:backdrop {
background-color: @window_bg_color;
color: @window_fg_color;
}
window:backdrop headerbar {
background-color: @headerbar_bg_color;
color: @headerbar_fg_color;
}
'';
};
# GNOME dconf settings
# GNOME dconf settings — stylix owns colour-scheme, gtk-theme,
# cursor-theme and accent-color now.
dconf.settings = {
# Interface / theme
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = "adw-gtk3-dark";
enable-hot-corners = false;
accent-color = "purple";
cursor-theme = "Adwaita";
cursor-size = 24;
};
# Wallpaper settings
@ -174,11 +141,6 @@
"org/gnome/shell/extensions/just-perfection" = {
window-demands-attention-focus = true;
};
# User themes extension — load wallpaper shell theme
"org/gnome/shell/extensions/user-theme" = {
name = "WallpaperShell";
};
};
};
};