nixos/settings/stylix.nix
rope 1091495674 theming: re-theme every app on wallpaper switch, crossfade wallpaper
settings/theming.nix renders a full config set per wallpaper (GTK, ghostty,
btop, hyprland, vesktop, zen, folder icons) from its own base16 palette;
theme-apply swaps them in and reloads what can reload.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 14:31:24 +01:00

50 lines
1.5 KiB
Nix

{ config, pkgs, lib, inputs, ... }:
{
# Imported for all hosts via flake.nix.
config = {
stylix = {
enable = true;
# builtins.path hashes only the image content, not the whole flake tree,
# so palette.json is only rebuilt when the wallpaper itself changes.
image = builtins.path {
name = "wallpaper.png";
path = inputs.self + "/walls/wallpaper.png";
};
polarity = "dark";
# Let stylix theme every target it supports. Per-target opt-outs go
# under home-manager.users.fred.stylix.targets.<x>.enable = false.
autoEnable = true;
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 24;
};
# caelestia's font set: Rubik for UI text, CaskaydiaCove NF for mono
# (still a nerd font, so terminal glyphs survive the swap).
fonts = {
monospace = {
package = pkgs.nerd-fonts.caskaydia-cove;
name = "CaskaydiaCove NF";
};
sansSerif = {
package = pkgs.rubik;
name = "Rubik";
};
serif = {
package = pkgs.rubik;
name = "Rubik";
};
};
};
# Per-app theming that has to follow the RUNTIME wallpaper (GTK, ghostty,
# btop, zen, vesktop, folder icons) lives in settings/theming.nix: it
# renders one set of config files per wallpaper in walls/ and swaps them
# in without a rebuild. Everything above is build-time and stays here.
};
}