2.home-manager/tests/modules/programs/kitty/auto-theme-files.nix
Yus314 de4cfffc98 kitty: add autoThemeFiles option
Add support for kitty's automatic theme switching based on OS
color scheme. This creates the required auto theme config files:
- light-theme.auto.conf
- dark-theme.auto.conf
- no-preference-theme.auto.conf

Closes: nix-community/home-manager#6869
2026-02-13 10:32:36 +01:00

27 lines
737 B
Nix

{ config, pkgs, ... }:
{
programs.kitty = {
enable = true;
autoThemeFiles = {
light = "GitHub";
dark = "TokyoNight";
noPreference = "OneDark";
};
};
test = {
assertFileExists = [
"home-files/.config/kitty/light-theme.auto.conf"
"home-files/.config/kitty/dark-theme.auto.conf"
"home-files/.config/kitty/no-preference-theme.auto.conf"
];
assertFileRegex = [
"home-files/.config/kitty/light-theme.auto.conf"
"^include .*themes/GitHub\\.conf$"
"home-files/.config/kitty/dark-theme.auto.conf"
"^include .*themes/TokyoNight\\.conf$"
"home-files/.config/kitty/no-preference-theme.auto.conf"
"^include .*themes/OneDark\\.conf$"
];
};
}