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:
parent
2cf3abce03
commit
ecaed80b18
8 changed files with 185 additions and 27 deletions
|
|
@ -1 +1,4 @@
|
|||
{ kitty-example-settings = ./example-settings.nix; }
|
||||
{
|
||||
kitty-example-settings = ./example-settings.nix;
|
||||
kitty-theme-to-themeFile = ./theme-to-themeFile.nix;
|
||||
}
|
||||
|
|
|
|||
24
tests/modules/programs/kitty/theme-to-themeFile.nix
Normal file
24
tests/modules/programs/kitty/theme-to-themeFile.nix
Normal 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$"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue