lib/types/fontType: Add size attribute (#1848)
* lib/types: Add size attribute to fontType * tests: Add test for kitty * modules/types/fontType: Make size nullable * Add release notes Co-authored-by: Sebastian Zivota <sebastian.zivota@mailbox.org>
This commit is contained in:
parent
cc60c22c69
commit
33edf558a0
8 changed files with 83 additions and 5 deletions
1
tests/modules/programs/kitty/default.nix
Normal file
1
tests/modules/programs/kitty/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ kitty-example-settings = ./example-settings.nix; }
|
||||
17
tests/modules/programs/kitty/example-settings-expected.conf
Normal file
17
tests/modules/programs/kitty/example-settings-expected.conf
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Generated by Home Manager.
|
||||
# See https://sw.kovidgoyal.net/kitty/conf.html
|
||||
|
||||
font_family DejaVu Sans
|
||||
font_size 8
|
||||
|
||||
|
||||
enable_audio_bell no
|
||||
scrollback_lines 10000
|
||||
update_check_interval 0
|
||||
|
||||
|
||||
map ctrl+c copy_or_interrupt
|
||||
map ctrl+f>2 set_font_size 20
|
||||
|
||||
|
||||
|
||||
32
tests/modules/programs/kitty/example-settings.nix
Normal file
32
tests/modules/programs/kitty/example-settings.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
package = pkgs.writeScriptBin "dummy-kitty" "";
|
||||
settings = {
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
};
|
||||
|
||||
font.name = "DejaVu Sans";
|
||||
font.size = 8;
|
||||
|
||||
keybindings = {
|
||||
"ctrl+c" = "copy_or_interrupt";
|
||||
"ctrl+f>2" = "set_font_size 20";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/kitty/kitty.conf
|
||||
assertFileContent \
|
||||
home-files/.config/kitty/kitty.conf \
|
||||
${./example-settings-expected.conf}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue