Configure theme of all your apps with a single line
Collection of adapters for automatically applying nix-colors base16
schemes.
Code for this example:
- colorScheme = inputs.nix-colors.colorSchemes.gruvbox-dark-hard;
+ colorScheme = inputs.nix-colors.colorSchemes.ayu-light;
Adapter | Accent | Notes |
---|---|---|
Adwaita (GTK3, GTK4) | 🟢 | sets GTK3 theme to adw-gtk3 |
Alacritty | 🔴 | |
dunst | 🟠 | |
✨Firefox✨ | 🟢 | depends on Adwaita |
GTK2 | 🟠 | |
Kvantum | 🟠 | Kvantum is problematic, consider disabling it if you encounter broken apps |
Rofi | 🔴 | |
swaylock | 🟠 | |
Wezterm | 🔴 |
(🟢 supported, 🟠 possible, 🔴 impossible)
- configure home-manager, make sure to pass
inputs
to your home module (vimjoyer tutorial) - add
nix-colors
andnix-colors-adapters
to youinputs
inflake.nix
:
inputs = {
...
nix-colors.url = "github:misterio77/nix-colors";
nix-colors-adapters.url = "gitlab:vfosnar/nix-colors-adapters";
...
};
- import them in your home module
home.nix
:
imports = [
...
inputs.nix-colors.homeManagerModules.default
inputs.nix-colors-adapters.homeManagerModules.default
...
];
- you're done!
You can configure any base16
theme using nix-colors.
To configure nix-colors
with Gruvbox Dark Hard:
colorScheme = inputs.nix-colors.colorSchemes.gruvbox-dark-hard;
All adapters are enabled by default. To disable an adapter set nixColorsAdapters.<adapter>.enable = false;
. For example to disable the kvantum
adapter so you can manage its theme manually:
nixColorsAdapters = {
kvantum.enable = false;
};
For Firefox to work you need to specify a list of profile names. The configuration will only apply to these profiles. To properly apply colors the System theme — auto
theme must be manually set in Firefox settings.
nixColorsAdapters = {
firefox.profiles = [ "alice", "bob" ];
};
Themes for Wezterm cannot be applied automatically so you have to run the following in your wezterm.lua:
config.colors = wezterm.color.load_base16_scheme("${config.nixColorsAdapters.wezterm.base16-file}");
return config;
or if configuring Wezterm outside of home manager
local wezterm = require 'wezterm';
config.colors = wezterm.color.load_base16_scheme(" ~/.config/wezterm/nix-colors-adapters-base16.yaml");
return config;
The accent color for selected theme is automatically selected for known themes (source). If you want to override the color and provide your own just set nixColorsAdapters.accent
. Example:
nixColorsAdapters = {
accent = "ff0000";
# or
accent = config.colorScheme.colors.base08;
};