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:
Sebastian Zivota 2021-04-07 16:18:09 +02:00 committed by GitHub
parent cc60c22c69
commit 33edf558a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 83 additions and 5 deletions

View file

@ -0,0 +1 @@
{ kitty-example-settings = ./example-settings.nix; }

View 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

View 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}
'';
};
}