kitty: remove IFD

With this change the theme check happens at activation time. An
integration test is also added to verify the functionality.

Fixes #5110
This commit is contained in:
alejandro-angulo 2024-08-17 10:21:57 -07:00 committed by Robert Helgesson
parent 2cf3abce03
commit ecaed80b18
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
8 changed files with 185 additions and 27 deletions

View file

@ -1 +1,4 @@
{ kitty-example-settings = ./example-settings.nix; }
{
kitty-example-settings = ./example-settings.nix;
kitty-theme-to-themeFile = ./theme-to-themeFile.nix;
}

View file

@ -0,0 +1,24 @@
{ config, lib, pkgs, options, ... }: {
config = {
programs.kitty = {
enable = true;
theme = "Space Gray Eighties";
};
test.stubs.kitty = { };
test.asserts.warnings.enable = true;
test.asserts.warnings.expected = [
("The option `programs.kitty.theme' defined in ${
lib.showFiles options.programs.kitty.theme.files
} has been changed to `programs.kitty.themeFile' that has a different"
+ " type. Please read `programs.kitty.themeFile' documentation and"
+ " update your configuration accordingly.")
];
nmt.script = ''
assertFileExists home-files/.config/kitty/kitty.conf
assertFileRegex home-files/.config/kitty/kitty.conf "^include .*themes/SpaceGray_Eighties\.conf$"
'';
};
}