with one click
stylix
Stylix Skill
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Stylix Skill
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Read, write, search and reorganise notes in the local Obsidian vaults. Use for anything touching ~/Documents/R3_vault, ~/Documents/Synechron or ~/Documents/My_Obsidian_Vault/Privat — finding notes, adding or editing content, renaming/moving notes without breaking links, and daily notes. Triggers on "my notes", "my vault", "Obsidian", "write this up in my notes", or a request to look something up in personal documentation.
Manage DNS records for the user's GoDaddy-registered domains. Add/upsert, delete, list, look up specific records, verify a stored record matches an expected value, and check public DNS resolution via dig. Triggers on `/dns`, requests to add/change/check A, AAAA, CNAME, MX, TXT, NS, SRV records on the user's domains, debugging DNS propagation, or auditing what's set at GoDaddy vs what's resolving in the wild.
Operate Google Workspace from the terminal via the `gog` CLI (gogcli). Use for checking and replying to Gmail, managing Google Tasks, reading and creating Calendar events, Google Chat (spaces/DMs/messages), Meet spaces, Contacts, Drive/Docs/Sheets, and more. Triggers on `/gog`, `/gog mail`, `/gog tasks`, `/gog events`, `/gog chat`, `/gog meet`, or any request to check/read/reply/send email, list or add tasks, see today's agenda, or message someone on Chat for the user's Google account.
Agenix Skill
cargo2nix Skill
COSMIC Desktop Environment Skill
| name | stylix |
| version | 1 |
| description | Stylix Skill |
Stylix is a comprehensive theming framework for NixOS-based systems that applies color schemes, wallpapers, and fonts across a wide range of applications. Unlike similar tools like base16.nix or nix-colors that only provide color definitions, Stylix follows an "it just works" philosophy by automatically implementing themes across supported programs.
Add Stylix to your flake inputs:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
stylix.url = "github:danth/stylix";
# Optional: Pin to a specific version
# stylix.url = "github:danth/stylix/release-24.11";
};
outputs = { nixpkgs, stylix, ... }: {
nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
modules = [
stylix.nixosModules.stylix
./configuration.nix
];
};
};
}
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
stylix.url = "github:danth/stylix";
};
outputs = { nixpkgs, home-manager, stylix, ... }: {
homeConfigurations.username = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { system = "x86_64-linux"; };
modules = [
stylix.homeManagerModules.stylix
./home.nix
];
};
};
}
When using Home Manager as a NixOS module, Stylix settings are automatically inherited:
{
nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
modules = [
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Stylix automatically integrates
}
./configuration.nix
];
};
}
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
darwin.url = "github:LnL7/nix-darwin";
stylix.url = "github:danth/stylix";
};
outputs = { nixpkgs, darwin, stylix, ... }: {
darwinConfigurations.hostname = darwin.lib.darwinSystem {
modules = [
stylix.darwinModules.stylix
./darwin-configuration.nix
];
};
};
}
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nix-on-droid.url = "github:t184256/nix-on-droid";
stylix.url = "github:danth/stylix";
};
outputs = { nixpkgs, nix-on-droid, stylix, ... }: {
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [
stylix.nixOnDroidModules.stylix
./nix-on-droid.nix
];
};
};
}
Stylix requires explicit activation:
{
stylix.enable = true;
}
The minimum viable configuration requires a wallpaper or color scheme:
{ pkgs, ... }:
{
stylix.enable = true;
stylix.image = ./wallpaper.png;
# Stylix will auto-generate color scheme from wallpaper
}
Or with an explicit color scheme:
{ pkgs, ... }:
{
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
}
Stylix includes the Tinted Theming (base16) scheme collection via pkgs.base16-schemes:
{ pkgs, ... }:
{
# Popular schemes
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml";
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-dark.yaml";
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml";
}
Define your own base16 color scheme:
{
stylix.base16Scheme = {
base00 = "282828"; # Background
base01 = "3c3836"; # Lighter background
base02 = "504945"; # Selection background
base03 = "665c54"; # Comments
base04 = "bdae93"; # Dark foreground
base05 = "d5c4a1"; # Default foreground
base06 = "ebdbb2"; # Light foreground
base07 = "fbf1c7"; # Light background
base08 = "fb4934"; # Red
base09 = "fe8019"; # Orange
base0A = "fabd2f"; # Yellow
base0B = "b8bb26"; # Green
base0C = "8ec07c"; # Cyan
base0D = "83a598"; # Blue
base0E = "d3869b"; # Magenta
base0F = "d65d0e"; # Brown
};
}
{
stylix.base16Scheme = builtins.fromYAML ''
scheme: "My Custom Theme"
author: "Your Name"
base00: "282828"
base01: "3c3836"
base02: "504945"
base03: "665c54"
base04: "bdae93"
base05: "d5c4a1"
base06: "ebdbb2"
base07: "fbf1c7"
base08: "fb4934"
base09: "fe8019"
base0A: "fabd2f"
base0B: "b8bb26"
base0C: "8ec07c"
base0D: "83a598"
base0E: "d3869b"
base0F: "d65d0e"
'';
}
{
stylix.base16Scheme = ./my-theme.yaml;
}
Where my-theme.yaml contains:
scheme: "My Theme Name"
author: "Your Name"
base00: "282828"
base01: "3c3836"
# ... other colors
If you don't specify stylix.base16Scheme, Stylix automatically generates one from your wallpaper:
{
stylix.enable = true;
stylix.image = ./wallpaper.png;
# No base16Scheme specified - auto-generated from image
# Control whether palette is light or dark
stylix.polarity = "dark"; # or "light" or "either"
}
View generated palette:
/etc/stylix/palette.html~/.config/stylix/palette.htmlModify portions of a color scheme without redefining everything:
{ pkgs, ... }:
{
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
stylix.override = {
base00 = "1d2021"; # Override background to darker
base08 = "cc241d"; # Override red
};
}
Reference configured colors in your own modules:
{ config, lib, ... }:
{
# Access individual colors
programs.kitty.extraConfig = ''
background ${config.lib.stylix.colors.base00}
foreground ${config.lib.stylix.colors.base05}
cursor ${config.lib.stylix.colors.base0D}
'';
# Available formats:
# config.lib.stylix.colors.base00 # Hex: "282828"
# config.lib.stylix.colors.base00-hex # With #: "#282828"
# config.lib.stylix.colors.base00-rgb-r # Red channel (0-255)
# config.lib.stylix.colors.base00-rgb-g # Green channel
# config.lib.stylix.colors.base00-rgb-b # Blue channel
# config.lib.stylix.colors.base00-dec-r # Red (0.0-1.0)
# config.lib.stylix.colors.base00-dec-g # Green (0.0-1.0)
# config.lib.stylix.colors.base00-dec-b # Blue (0.0-1.0)
}
Example using colors in custom scripts:
{ config, pkgs, ... }:
let
colors = config.lib.stylix.colors;
in {
home.packages = [
(pkgs.writeShellScriptBin "show-theme" ''
echo "Background: ${colors.base00}"
echo "Foreground: ${colors.base05}"
echo "Red: ${colors.base08}"
echo "Green: ${colors.base0B}"
echo "Blue: ${colors.base0D}"
'')
];
}
{
stylix.image = ./wallpapers/gruvbox-dark.png;
# Or absolute path
# stylix.image = /home/user/Pictures/wallpaper.jpg;
}
{ pkgs, ... }:
{
stylix.image = pkgs.fetchurl {
url = "https://example.com/wallpaper.png";
sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
}
Create solid color wallpaper from theme:
{ config, ... }:
{
stylix.image = config.lib.stylix.pixel "base00";
# Creates a 1x1 pixel wallpaper in base00 color
# Useful for solid color backgrounds
}
Adjust brightness/contrast programmatically:
{ pkgs, ... }:
let
dimmedWallpaper = pkgs.runCommand "dimmed-wallpaper" {
buildInputs = [ pkgs.imagemagick ];
} ''
convert ${./original-wallpaper.png} \
-brightness-contrast -20x0 \
$out
'';
in {
stylix.image = dimmedWallpaper;
}
Generate wallpaper from theme color:
{ config, pkgs, lib, ... }:
let
themeColor = config.lib.stylix.colors.base0A;
generatedWallpaper = pkgs.runCommand "theme-wallpaper" {
buildInputs = [ pkgs.imagemagick ];
} ''
convert -size 1920x1080 xc:#${themeColor} $out
'';
in {
stylix.image = generatedWallpaper;
}
Stylix uses these defaults:
Override individual font families:
{ pkgs, ... }:
{
stylix.fonts = {
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
monospace = {
package = pkgs.jetbrains-mono;
name = "JetBrains Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
}
Modern Developer Setup:
{ pkgs, ... }:
{
stylix.fonts = {
monospace = {
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
name = "JetBrainsMono Nerd Font Mono";
};
sansSerif = {
package = pkgs.inter;
name = "Inter";
};
serif = {
package = pkgs.merriweather;
name = "Merriweather";
};
};
}
Classic Setup:
{ pkgs, ... }:
{
stylix.fonts = {
monospace = {
package = pkgs.fira-code;
name = "Fira Code";
};
sansSerif = {
package = pkgs.roboto;
name = "Roboto";
};
serif = {
package = pkgs.roboto-slab;
name = "Roboto Slab";
};
};
}
Minimalist Setup:
{ pkgs, ... }:
{
stylix.fonts = {
monospace = {
package = pkgs.source-code-pro;
name = "Source Code Pro";
};
sansSerif = {
package = pkgs.source-sans;
name = "Source Sans 3";
};
serif = {
package = pkgs.source-serif;
name = "Source Serif 4";
};
};
}
Configure base font sizes:
{
stylix.fonts.sizes = {
applications = 12;
terminal = 11;
desktop = 10;
popups = 12;
};
}
Targets are individual applications or system components that Stylix can theme. Each target can be enabled or disabled independently.
By default, Stylix enables all available targets. Control this globally:
{
stylix.enable = true;
stylix.autoEnable = false; # Disable all targets by default
# Then enable specific targets
stylix.targets.kitty.enable = true;
stylix.targets.gtk.enable = true;
stylix.targets.gnome.enable = true;
}
Disable individual targets while keeping others enabled:
{
stylix.enable = true;
# autoEnable is true by default
# Disable specific targets
stylix.targets.firefox.enable = false;
stylix.targets.plymouth.enable = false;
}
{
stylix.targets = {
# Desktop Environments
gnome.enable = true;
kde.enable = true;
# Display Managers
grub.enable = true;
plymouth.enable = true;
# GTK Applications
gtk.enable = true;
# Specific Applications
console.enable = true;
nixvim.enable = true;
};
}
{
stylix.targets = {
# Terminal Emulators
alacritty.enable = true;
kitty.enable = true;
foot.enable = true;
wezterm.enable = true;
# Shells
fish.enable = true;
zsh.enable = true;
# Editors
vim.enable = true;
neovim.enable = true;
emacs.enable = true;
vscode.enable = true;
# Window Managers
hyprland.enable = true;
i3.enable = true;
sway.enable = true;
# Notification Daemons
dunst.enable = true;
mako.enable = true;
# Bars
waybar.enable = true;
polybar.enable = true;
# Browsers
firefox.enable = true;
qutebrowser.enable = true;
# Applications
rofi.enable = true;
fzf.enable = true;
bat.enable = true;
btop.enable = true;
};
}
If a Stylix module conflicts with your configuration:
{ inputs, ... }:
{
disabledModules = [
"${inputs.stylix}/modules/kitty/nixos.nix"
];
# Now configure kitty manually
programs.kitty = {
# Your custom configuration
};
}
When using Home Manager as a NixOS module, settings are automatically inherited:
# In your NixOS configuration
{ pkgs, ... }:
{
# System-wide Stylix settings
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
stylix.image = ./wallpaper.png;
home-manager.users.alice = { ... };
# Alice automatically inherits stylix settings
}
Override Stylix settings per user:
# NixOS configuration
{ pkgs, ... }:
{
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
home-manager.users.alice = { pkgs, ... }:
{
# Alice uses a different theme
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
};
home-manager.users.bob = { ... };
# Bob uses the system default (gruvbox)
}
Prevent Home Manager from automatically importing Stylix:
{
stylix.homeManagerIntegration.autoImport = false;
}
# In Home Manager configuration
{
stylix.homeManagerIntegration.followSystem = false;
# This user's Stylix settings are independent of system
}
Configure transparency for various UI elements:
{
stylix.opacity = {
terminal = 0.9;
desktop = 0.95;
popups = 0.85;
applications = 1.0;
};
}
{ pkgs, ... }:
{
stylix.cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 24;
};
}
Control whether generated themes should be light or dark:
{
stylix.polarity = "dark"; # Force dark themes
# stylix.polarity = "light"; # Force light themes
# stylix.polarity = "either"; # Auto-detect from wallpaper
}
{ pkgs, ... }:
{
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
stylix.image = ./wallpaper.png;
# GNOME-specific
stylix.targets.gnome.enable = true;
stylix.targets.gtk.enable = true;
# Font configuration for GNOME
stylix.fonts = {
sansSerif = {
package = pkgs.cantarell-fonts;
name = "Cantarell";
};
monospace = {
package = pkgs.jetbrains-mono;
name = "JetBrains Mono";
};
};
}
Test GNOME theme:
nix run github:nix-community/stylix#testbed:gnome:dark
{ pkgs, ... }:
{
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/breeze-dark.yaml";
stylix.image = ./wallpaper.png;
stylix.targets.kde.enable = true;
# Note: KDE support is still in development
# Some manual theme application may be required
}
{ pkgs, config, ... }:
{
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
stylix.image = ./wallpaper.png;
# Home Manager
home-manager.users.user = {
stylix.targets.hyprland.enable = true;
stylix.targets.waybar.enable = true;
stylix.targets.kitty.enable = true;
stylix.targets.rofi.enable = true;
# Stylix colors available in Hyprland config
wayland.windowManager.hyprland.settings = {
general = {
"col.active_border" = "rgb(${config.lib.stylix.colors.base0D})";
"col.inactive_border" = "rgb(${config.lib.stylix.colors.base03})";
};
};
};
}
{ pkgs, config, ... }:
{
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
home-manager.users.user = {
stylix.targets.i3.enable = true;
stylix.targets.polybar.enable = true;
xsession.windowManager.i3.config = {
# Colors automatically applied by Stylix
# Can reference theme colors if needed
bars = [{
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs";
}];
};
};
}
Alacritty:
{
stylix.targets.alacritty.enable = true;
# Stylix automatically configures:
# - Color scheme
# - Font family and size
# - Opacity
}
Kitty:
{
stylix.targets.kitty.enable = true;
# Additional customization
programs.kitty.extraConfig = ''
# Stylix handles colors and fonts
# Add custom settings here
cursor_blink_interval 0
'';
}
WezTerm:
{
stylix.targets.wezterm.enable = true;
}
Neovim:
{
stylix.targets.neovim.enable = true;
# Stylix sets colorscheme automatically
programs.neovim = {
enable = true;
# Your plugins and config
};
}
VSCode:
{
stylix.targets.vscode.enable = true;
programs.vscode = {
enable = true;
# Stylix provides theme extension
};
}
Emacs:
{
stylix.targets.emacs.enable = true;
}
Firefox:
{
stylix.targets.firefox.enable = true;
# Stylix creates custom theme
programs.firefox = {
enable = true;
# Additional configuration
};
}
Qutebrowser:
{
stylix.targets.qutebrowser.enable = true;
}
Fish:
{
stylix.targets.fish.enable = true;
}
Zsh:
{
stylix.targets.zsh.enable = true;
}
Fzf:
{
stylix.targets.fzf.enable = true;
# Colors automatically configured
programs.fzf.enable = true;
}
Bat:
{
stylix.targets.bat.enable = true;
}
Btop:
{
stylix.targets.btop.enable = true;
}
Rofi:
{
stylix.targets.rofi.enable = true;
programs.rofi = {
enable = true;
# Stylix provides theme
};
}
Dunst:
{
stylix.targets.dunst.enable = true;
}
Mako:
{
stylix.targets.mako.enable = true;
}
{ pkgs, ... }:
{
# NixOS Configuration
stylix.enable = true;
stylix.image = ./wallpaper.png;
# Auto-generates color scheme from wallpaper
# Desktop environment
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Stylix applies to GNOME automatically
}
{ pkgs, inputs, ... }:
{
# Flake inputs
inputs = {
stylix.url = "github:danth/stylix";
};
# NixOS Configuration
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
stylix.image = pkgs.fetchurl {
url = "https://example.com/wallpaper.png";
sha256 = "...";
};
stylix.fonts = {
monospace = {
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
name = "JetBrainsMono Nerd Font Mono";
};
sansSerif = {
package = pkgs.inter;
name = "Inter";
};
};
stylix.cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 24;
};
stylix.opacity = {
terminal = 0.9;
popups = 0.85;
};
# Home Manager
home-manager.users.user = { pkgs, config, ... }:
{
# Wayland compositor
wayland.windowManager.hyprland.enable = true;
# Styled applications
stylix.targets = {
hyprland.enable = true;
waybar.enable = true;
kitty.enable = true;
rofi.enable = true;
dunst.enable = true;
neovim.enable = true;
firefox.enable = true;
fzf.enable = true;
bat.enable = true;
};
programs.kitty.enable = true;
programs.rofi.enable = true;
programs.waybar.enable = true;
services.dunst.enable = true;
};
}
{ pkgs, ... }:
{
# System default theme
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
stylix.image = ./default-wallpaper.png;
# Alice: Uses system default
home-manager.users.alice = {
# Inherits system theme
};
# Bob: Custom theme
home-manager.users.bob = { pkgs, ... }:
{
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
stylix.image = ./bob-wallpaper.png;
};
# Charlie: Fully custom
home-manager.users.charlie = { pkgs, ... }:
{
stylix.base16Scheme = {
base00 = "1e1e2e";
base01 = "181825";
# ... custom colors
};
stylix.image = ./charlie-wallpaper.jpg;
stylix.fonts.monospace = {
package = pkgs.victor-mono;
name = "Victor Mono";
};
};
}
{ pkgs, config, ... }:
{
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/one-dark.yaml";
home-manager.users.dev = { pkgs, ... }:
{
# Developer tools with consistent theming
stylix.targets = {
neovim.enable = true;
vscode.enable = true;
alacritty.enable = true;
tmux.enable = true;
git.enable = true;
fzf.enable = true;
bat.enable = true;
btop.enable = true;
};
programs = {
neovim.enable = true;
vscode.enable = true;
alacritty.enable = true;
tmux.enable = true;
git.enable = true;
fzf.enable = true;
bat.enable = true;
btop.enable = true;
};
# Custom development shell with themed prompt
programs.fish = {
enable = true;
# Stylix handles theming
};
};
}
Use lib.mkAfter to ensure your CSS takes priority:
{ lib, ... }:
{
programs.waybar.style = lib.mkAfter ''
#workspaces button {
background: @base01;
border-radius: 8px;
}
#workspaces button.active {
background: @base0D;
}
'';
}
Generate wallpapers based on theme colors:
{ config, pkgs, ... }:
let
colors = config.lib.stylix.colors;
gradientWallpaper = pkgs.runCommand "gradient-wallpaper" {
buildInputs = [ pkgs.imagemagick ];
} ''
convert -size 1920x1080 \
gradient:#${colors.base00}-#${colors.base01} \
$out
'';
in {
stylix.image = gradientWallpaper;
}
Let Stylix analyze your favorite wallpaper:
{
stylix.enable = true;
stylix.image = ./favorite-wallpaper.jpg;
stylix.polarity = "dark";
# View generated palette at /etc/stylix/palette.html
}
Then if you like the result, you can export it as a permanent scheme.
{ pkgs, ... }:
let
workTheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
playTheme = "${pkgs.base16-schemes}/share/themes/synthwave-84.yaml";
in {
# Default to work theme
stylix.base16Scheme = workTheme;
# Script to switch themes
home.packages = [
(pkgs.writeShellScriptBin "theme-work" ''
# Implementation to switch to work theme
'')
(pkgs.writeShellScriptBin "theme-play" ''
# Implementation to switch to play theme
'')
];
}
{
stylix.opacity.terminal = 0.9;
# Override for specific terminal
programs.kitty.settings.background_opacity = "0.95";
}
{
stylix.targets.vim.enable = true;
programs.vim.extraConfig = ''
" Disable Stylix colorscheme temporarily
syntax off
" Use your own colorscheme
colorscheme custom
'';
}
View current theme configuration:
# NixOS
cat /etc/stylix/palette.html
# Home Manager
cat ~/.config/stylix/palette.html
Check which colors are being used:
{ config, lib, pkgs, ... }:
{
home.packages = [
(pkgs.writeShellScriptBin "show-stylix-colors" ''
echo "Stylix Color Scheme:"
echo "==================="
${lib.concatStringsSep "\n" (lib.mapAttrsToList
(name: value: "echo '${name}: ${value}'")
config.lib.stylix.colors
)}
'')
];
}
Create a wallpaper collage:
{ pkgs, ... }:
let
collageWallpaper = pkgs.runCommand "collage" {
buildInputs = [ pkgs.imagemagick ];
} ''
montage ${./wall1.png} ${./wall2.png} ${./wall3.png} ${./wall4.png} \
-tile 2x2 -geometry 960x540+0+0 \
$out
'';
in {
stylix.image = collageWallpaper;
}
Check if Stylix is enabled:
{
stylix.enable = true; # Must be explicitly set
}
Verify targets are enabled:
{
# Check autoEnable
stylix.autoEnable = true; # Default
# Or enable specific targets
stylix.targets.kitty.enable = true;
}
Rebuild and switch:
# NixOS
sudo nixos-rebuild switch
# Home Manager
home-manager switch
Check polarity:
{
stylix.polarity = "dark"; # or "light"
}
View generated palette:
# Check what colors were generated
firefox /etc/stylix/palette.html
Use explicit color scheme:
{ pkgs, ... }:
{
# Instead of auto-generation
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
}
Verify font package is correct:
{ pkgs, ... }:
{
stylix.fonts.monospace = {
package = pkgs.jetbrains-mono;
name = "JetBrains Mono"; # Exact name from `fc-list`
};
}
Check font name:
fc-list | grep -i "jetbrains"
Ensure font sizes are set:
{
stylix.fonts.sizes = {
applications = 12;
terminal = 11;
};
}
Disable conflicting module:
{ inputs, ... }:
{
disabledModules = [
"${inputs.stylix}/modules/alacritty/hm.nix"
];
# Configure manually
programs.alacritty = {
# Manual configuration
};
}
Verify integration is enabled:
{
stylix.homeManagerIntegration.autoImport = true; # Default
}
Check system following:
# In Home Manager config
{
stylix.homeManagerIntegration.followSystem = true;
}
Explicit override if needed:
# In Home Manager config
{ pkgs, ... }:
{
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
# Overrides system theme
}
Check file exists:
ls -lh ./wallpaper.png
Try absolute path:
{
stylix.image = /home/user/wallpapers/background.png;
}
Verify image format:
file wallpaper.png
# Should show: PNG image data
KDE support is still in development. Some manual steps may be required:
Workaround:
{
stylix.targets.kde.enable = true;
# May need to manually apply some settings
# Check Stylix GitHub issues for latest KDE status
}
Disable unused targets:
{
stylix.autoEnable = false;
# Enable only what you need
stylix.targets.kitty.enable = true;
stylix.targets.neovim.enable = true;
}
Optimize wallpaper:
{ pkgs, ... }:
let
optimizedWallpaper = pkgs.runCommand "wallpaper" {
buildInputs = [ pkgs.imagemagick ];
} ''
convert ${./large-wallpaper.png} \
-resize 1920x1080 \
-quality 85 \
$out
'';
in {
stylix.image = optimizedWallpaper;
}
# ✅ Good: Explicit, reproducible
{ pkgs, ... }:
{
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
}
# ❌ Avoid: Auto-generated can change
{
stylix.image = ./random-wallpaper.png;
# Color scheme regenerates if wallpaper changes
}
# ✅ Good: Clear intent
{
stylix.polarity = "dark";
}
# ❌ Avoid: Ambiguous
{
# Defaults to "either" - may not match expectations
}
{
inputs = {
stylix.url = "github:danth/stylix/release-24.11";
# Pin to stable release
};
}
{
# Document the theme choice
stylix.base16Scheme = {
# Based on Gruvbox Dark with custom adjustments
# - Darkened background for reduced eye strain
# - Increased blue saturation for better link visibility
base00 = "1d2021"; # Background (darker than default)
base01 = "3c3836";
# ...
};
}
# Test locally before committing
home-manager switch
# Verify changes
firefox ~/.config/stylix/palette.html
# Commit only after verification
git add .
git commit -m "theme: switch to nord"
# ✅ Good: Explicit about what's themed
{
stylix.autoEnable = false;
stylix.targets = {
alacritty.enable = true;
neovim.enable = true;
firefox.enable = true;
};
}
# ❌ Avoid: Everything enabled may cause conflicts
{
stylix.autoEnable = true;
# All targets enabled, may conflict with manual configs
}
# shared/theme.nix
{ pkgs, ... }:
{
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
stylix.fonts = {
monospace = {
package = pkgs.jetbrains-mono;
name = "JetBrains Mono";
};
};
}
# hosts/desktop/configuration.nix
{
imports = [ ../../shared/theme.nix ];
stylix.image = ./desktop-wallpaper.png;
}
# hosts/laptop/configuration.nix
{
imports = [ ../../shared/theme.nix ];
stylix.image = ./laptop-wallpaper.png;
}
# ✅ Good: Reproducible
{
stylix.image = ./wallpapers/gruvbox.png;
}
# ❌ Avoid: External dependencies
{
stylix.image = /home/user/Downloads/wallpaper.png;
# Breaks on other machines
}
# ✅ Good: Minor tweaks
{ pkgs, ... }:
{
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
stylix.override = {
base00 = "1d2021"; # Slightly darker background
};
}
# ❌ Avoid: Extensive overrides
{
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
stylix.override = {
# Changing 10+ colors defeats purpose of base scheme
base00 = "...";
base01 = "...";
# ... many more
};
# Just define a custom scheme instead
}
{ pkgs, ... }:
let
remoteWallpaper = pkgs.fetchurl {
url = "https://example.com/wallpaper.png";
sha256 = "sha256-AAAA...";
};
localFallback = ./fallback-wallpaper.png;
in {
stylix.image = remoteWallpaper;
# Keep local fallback in repo for offline builds
}
{ pkgs, ... }:
{
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
stylix.image = ./wallpaper.png;
}
| Option | Type | Description |
|---|---|---|
stylix.enable | boolean | Enable Stylix |
stylix.base16Scheme | path/attrset/string | Color scheme |
stylix.image | path | Wallpaper image |
stylix.polarity | "dark"/"light"/"either" | Theme polarity |
stylix.autoEnable | boolean | Auto-enable all targets |
stylix.fonts.* | attrset | Font configuration |
stylix.opacity.* | float | Opacity settings |
stylix.cursor.* | attrset | Cursor theme |
stylix.targets.<app>.enable | boolean | Enable per-app |
gruvbox-dark-medium.yamlnord.yamldracula.yamlcatppuccin-mocha.yamltokyo-night-dark.yamlsolarized-dark.yamlone-dark.yamlconfig.lib.stylix.colors.base00 # "282828"
config.lib.stylix.colors.base00-hex # "#282828"
config.lib.stylix.colors.base00-rgb-r # Red channel
config.lib.stylix.pixel "base00" # 1x1 wallpaper
# NixOS
firefox /etc/stylix/palette.html
# Home Manager
firefox ~/.config/stylix/palette.html
# GNOME Dark
nix run github:nix-community/stylix#testbed:gnome:dark
# GNOME Light
nix run github:nix-community/stylix#testbed:gnome:light
Stylix excels at providing a unified, declarative theming experience across your entire NixOS system while maintaining the flexibility to customize per-application when needed.
Stylix is a powerful theming framework that brings consistency and ease to NixOS system appearance management. By leveraging base16 color schemes, automatic wallpaper analysis, and comprehensive application support, it enables declarative, reproducible theming across your entire system.
Key advantages:
Start with a simple configuration and expand as needed. Stylix makes it easy to maintain a beautiful, consistent system appearance across all your NixOS machines.