1
0
mirror of https://github.com/nix-community/home-manager synced 2024-07-05 21:03:27 +02:00
home-manager/tests/modules/programs/kitty/example-settings.nix
Jason Felice 33db7cc6a6
kitty: add environment and darwinLaunchOptions options (#2280)
* kitty: add environment option

* kitty: add darwinLaunchOptions option

See https://sw.kovidgoyal.net/kitty/faq/#how-do-i-specify-command-line-options-for-kitty-on-macos

* kitty: only allow darwinLaunchOptions on darwin

* kitty: make expression shorter

* kitty: fix assertion message
2021-08-26 22:08:34 -04:00

48 lines
1.1 KiB
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.kitty = {
enable = true;
darwinLaunchOptions = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin [
"--single-instance"
"--directory=/tmp/my-dir"
"--listen-on=unix:/tmp/my-socket"
];
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";
};
environment = { LS_COLORS = "1"; };
};
nixpkgs.overlays =
[ (self: super: { kitty = pkgs.writeScriptBin "dummy-kitty" ""; }) ];
nmt.script = ''
assertFileExists home-files/.config/kitty/kitty.conf
assertFileContent \
home-files/.config/kitty/kitty.conf \
${./example-settings-expected.conf}
'' + lib.optionalString pkgs.stdenv.hostPlatform.isDarwin ''
assertFileContent \
home-files/.config/kitty/macos-launch-services-cmdline \
${./example-macos-launch-services-cmdline}
'';
};
}