feat(desktop): theme the graphical layer Nord with Stylix (task 0022) #14

Merged
alexion merged 2 commits from task-0022-stylix-nord-theming into main 2026-07-22 11:45:06 -04:00
Owner

Task: .claude/tasks/0022-stylix-nord-theming.md

Summary

Themes the whole new graphical layer Nord from a single source.

  • Adds Stylix as a flake input, imported into every host's module set via lib.nix (inert until enabled).
  • Adds modules/desktop/theming.nix, guarded by modules.desktop.theming.enable and turned on by the desktop aggregator, which resolves a single Nord base16 scheme and applies it to GTK, Qt, cursor, and the system monospace font.
  • Sets a single static Nord wallpaper.
  • Scopes Stylix to the graphical layer: the fish, tmux, and nixvim targets are off so the terminal tools keep their hand-written themes.

nix flake check is green for neogaia, and an eval probe confirms config.lib.stylix.colors.scheme resolves to Nord.

Deviations from the plan

  • Wallpaper is a generated Nord gradient, not a shipped image. Stylix requires an image; rather than commit a binary or fetch one at build time, the module draws a vertical gradient across the Nord Polar Night shades (#2E3440#3B4252) with ImageMagick. Static, genuinely Nord, fully reproducible. Swapping in a picture later is a one-line change.
  • The nvim target is nixvim, not neovim, since nvim is configured through nixvim here; disabling neovim would have left it themed.
  • fish is disabled at two levels (system programs.fish and home-manager), matching where it is enabled.
  • System monospace pinned to JetBrains Mono; serif/sans/emoji left at Stylix's Nord-coherent defaults.

Review

Risk

Overall: Medium

  • Blast radius: Medium — lib.nix imports the Stylix module into every host's module set, and desktop.nix flips theming on by mkDefault for any desktop host.
  • Reversibility: Low — pure add; drop the input, module, and two lines to fully revert, no state or migration.
  • Test coverage: Medium — eval/build exercised by nix flake check, but rendering relies on manual live-session checking.
  • Sensitive domain: Low — purely cosmetic; no auth, permissions, concurrency, or data.
  • Size & complexity: Low — ~64-line flat declarative module, no branching.
  • Runtime criticality: Low — desktop theming, worst case an ugly login visual.

Unaddressed findings

Standards

  • theming.nix wallpaper comment — a judgement call that the "no committed binary and no network fetch" note borders on justifying the choice against alternatives. Kept: it states a real present consequence of the generated-gradient approach, which the reviewer agreed is defensible.

Spec

  • Wallpaper is a generated two-colour Nord gradient rather than a shipped Nord picture (spec: "a single static Nord wallpaper"). In-scope and violates no criterion — static and genuinely Nord-coloured — but a substituted interpretation kept deliberately to avoid a committed binary or a build-time network fetch. Flagged for operator awareness; trivially swappable later.
  • fonts.monospace pinned to JetBrains Mono, where the criterion asked only for "system fonts". Minor, reasonable default.

— Claude

Task: `.claude/tasks/0022-stylix-nord-theming.md` ## Summary Themes the whole new graphical layer Nord from a single source. - Adds Stylix as a flake input, imported into every host's module set via `lib.nix` (inert until enabled). - Adds `modules/desktop/theming.nix`, guarded by `modules.desktop.theming.enable` and turned on by the desktop aggregator, which resolves a single Nord base16 scheme and applies it to GTK, Qt, cursor, and the system monospace font. - Sets a single static Nord wallpaper. - Scopes Stylix to the graphical layer: the fish, tmux, and nixvim targets are off so the terminal tools keep their hand-written themes. `nix flake check` is green for neogaia, and an eval probe confirms `config.lib.stylix.colors.scheme` resolves to `Nord`. ### Deviations from the plan - **Wallpaper is a generated Nord gradient, not a shipped image.** Stylix requires an `image`; rather than commit a binary or fetch one at build time, the module draws a vertical gradient across the Nord Polar Night shades (`#2E3440` → `#3B4252`) with ImageMagick. Static, genuinely Nord, fully reproducible. Swapping in a picture later is a one-line change. - **The nvim target is `nixvim`, not `neovim`**, since nvim is configured through nixvim here; disabling `neovim` would have left it themed. - **fish is disabled at two levels** (system `programs.fish` and home-manager), matching where it is enabled. - **System monospace pinned to JetBrains Mono**; serif/sans/emoji left at Stylix's Nord-coherent defaults. ## Review ### Risk **Overall: Medium** - Blast radius: Medium — `lib.nix` imports the Stylix module into every host's module set, and `desktop.nix` flips theming on by `mkDefault` for any desktop host. - Reversibility: Low — pure add; drop the input, module, and two lines to fully revert, no state or migration. - Test coverage: Medium — eval/build exercised by `nix flake check`, but rendering relies on manual live-session checking. - Sensitive domain: Low — purely cosmetic; no auth, permissions, concurrency, or data. - Size & complexity: Low — ~64-line flat declarative module, no branching. - Runtime criticality: Low — desktop theming, worst case an ugly login visual. ### Unaddressed findings **Standards** - `theming.nix` wallpaper comment — a judgement call that the "no committed binary and no network fetch" note borders on justifying the choice against alternatives. Kept: it states a real present consequence of the generated-gradient approach, which the reviewer agreed is defensible. **Spec** - Wallpaper is a generated two-colour Nord gradient rather than a shipped Nord picture (spec: "a single static Nord wallpaper"). In-scope and violates no criterion — static and genuinely Nord-coloured — but a substituted interpretation kept deliberately to avoid a committed binary or a build-time network fetch. Flagged for operator awareness; trivially swappable later. - `fonts.monospace` pinned to JetBrains Mono, where the criterion asked only for "system fonts". Minor, reasonable default. — Claude
alexion added 1 commit 2026-07-22 10:29:00 -04:00
Add Stylix as a flake input and a desktop theming module that resolves a
single Nord base16 scheme across the graphical surface: GTK, Qt, cursor,
and the system monospace font, plus a static Nord wallpaper drawn as a
Polar Night gradient.

Scope the theming to the graphical layer alone. The Stylix targets for
fish (at both system and home-manager level), tmux, and nixvim stay off
so the terminal tools keep their hand-written themes.
alexion reviewed 2026-07-22 11:28:21 -04:00
@@ -0,0 +56,4 @@
# nvim, tmux, and fish are configured through home-manager and keep their
# own hand-written themes, so their Stylix targets stay off.
stylix.targets = {
fish.enable = false;
Author
Owner

What's the point of Stylix if I still need hand written themes...?

What's the point of Stylix if I still need hand written themes...?
alexion reviewed 2026-07-22 11:30:21 -04:00
@@ -0,0 +56,4 @@
# nvim, tmux, and fish are configured through home-manager and keep their
# own hand-written themes, so their Stylix targets stay off.
stylix.targets = {
fish.enable = false;
Author
Owner

Fair challenge. Stylix's payoff here isn't the terminal — it's everything that had no theme: GTK apps, Qt apps, the cursor, and the bar / launcher / lock / notifications still to come. That's roughly a dozen surfaces driven from one scheme so they can't drift apart. The terminal is the one place we already had curated Nord, so it's the one place Stylix adds least.

Per tool:

  • nvimgbprod/nord.nvim, a purpose-built colorscheme with treesitter-aware highlights. Stylix's neovim target would swap that for a generic 16-colour base16 mapping — a downgrade, not a win.
  • tmux → hand-placed Nord hex in the status bar (#2E3440 / #88C0D0 / …), already exactly as wanted.
  • fish → no real colour theme to protect; it rides the terminal palette.

And it's reversible per target — each is a one-line enable = true — so nothing is locked in. If you want to shrink the hand-theme surface, tmux and fish are the safe ones to hand to Stylix; I'd keep nvim hand-themed, since the dedicated colorscheme beats the base16 mapping. Say the word and I'll flip whichever you want.

— Claude

Fair challenge. Stylix's payoff here isn't the terminal — it's everything that had *no* theme: GTK apps, Qt apps, the cursor, and the bar / launcher / lock / notifications still to come. That's roughly a dozen surfaces driven from one scheme so they can't drift apart. The terminal is the one place we *already* had curated Nord, so it's the one place Stylix adds least. Per tool: - **nvim** → `gbprod/nord.nvim`, a purpose-built colorscheme with treesitter-aware highlights. Stylix's neovim target would swap that for a generic 16-colour base16 mapping — a downgrade, not a win. - **tmux** → hand-placed Nord hex in the status bar (`#2E3440` / `#88C0D0` / …), already exactly as wanted. - **fish** → no real colour theme to protect; it rides the terminal palette. And it's reversible per target — each is a one-line `enable = true` — so nothing is locked in. If you want to shrink the hand-theme surface, **tmux and fish are the safe ones to hand to Stylix**; I'd keep **nvim** hand-themed, since the dedicated colorscheme beats the base16 mapping. Say the word and I'll flip whichever you want. — Claude
Author
Owner

Only nvim shouldn't be managed by stylix

Only nvim shouldn't be managed by stylix
alexion added 1 commit 2026-07-22 11:38:46 -04:00
Narrow the terminal tools excluded from Stylix to nvim alone. nvim keeps
its dedicated gbprod/nord.nvim colorscheme, which is richer than the
base16 mapping Stylix would apply.

tmux and fish are now Stylix-managed. Drop the hand-written Nord colours
from the tmux status bar so Stylix themes the status and pane styles,
keeping the minimal layout (session name plus window list) reapplied
after Stylix so it still wins.
alexion reviewed 2026-07-22 11:39:02 -04:00
Author
Owner

Done in 6d1afa4. Only nixvim stays off now; tmux and fish are Stylix-managed.

fish had no colour theme of its own, so that was a clean flip. tmux did — a hand-written Nord status bar in extra.conf — which would have fought Stylix, so I removed those colour lines and let Stylix theme the status and pane styles. I kept your minimal layout (session name + window list, empty right side) and it's reapplied after Stylix's theme, so the layout still wins while the colours come from the one scheme.

Verified on the rendered tmux.conf: Stylix sources base16-nord.conf before your layout block, its unconditional colour lines apply, and its optional verbose statusbar stays gated off — so no clobbering. nix flake check is green.

— Claude

Done in 6d1afa4. Only `nixvim` stays off now; tmux and fish are Stylix-managed. fish had no colour theme of its own, so that was a clean flip. tmux did — a hand-written Nord status bar in `extra.conf` — which would have fought Stylix, so I removed those colour lines and let Stylix theme the status and pane styles. I kept your minimal layout (session name + window list, empty right side) and it's reapplied after Stylix's theme, so the layout still wins while the colours come from the one scheme. Verified on the rendered `tmux.conf`: Stylix sources `base16-nord.conf` before your layout block, its unconditional colour lines apply, and its optional verbose statusbar stays gated off — so no clobbering. `nix flake check` is green. — Claude
alexion marked this conversation as resolved
alexion merged commit 6d1afa41ed into main 2026-07-22 11:45:06 -04:00
alexion deleted branch task-0022-stylix-nord-theming 2026-07-22 11:45:08 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/dotfiles#14