home-manager/tests/modules/programs/wezterm/example-setting.nix
Hemanth Bollamreddi d9e03b7f8c
wezterm: add module
2022-08-07 11:11:56 +02:00

47 lines
1.3 KiB
Nix

{ ... }:
{
programs.wezterm = {
enable = true;
extraConfig = ''
return {
font = wezterm.font("JetBrains Mono"),
font_size = 16.0,
color_scheme = "Tomorrow Night",
hide_tab_bar_if_only_one_tab = true,
default_prog = { "zsh", "--login", "-c", "tmux attach -t dev || tmux new -s dev" },
keys = {
{key="n", mods="SHIFT|CTRL", action="ToggleFullScreen"},
}
}
'';
};
test.stubs.wezterm = { };
nmt.script = let
expected = builtins.toFile "wezterm.lua" ''
-- Generated by Home Manager.
-- See https://wezfurlong.org/wezterm/
-- Add config folder to watchlist for config reloads.
local wezterm = require 'wezterm';
wezterm.add_to_config_reload_watch_list(wezterm.config_dir)
return {
font = wezterm.font("JetBrains Mono"),
font_size = 16.0,
color_scheme = "Tomorrow Night",
hide_tab_bar_if_only_one_tab = true,
default_prog = { "zsh", "--login", "-c", "tmux attach -t dev || tmux new -s dev" },
keys = {
{key="n", mods="SHIFT|CTRL", action="ToggleFullScreen"},
}
}
'';
in ''
assertFileExists home-files/.config/wezterm/wezterm.lua
assertFileContent home-files/.config/wezterm/wezterm.lua ${expected}
'';
}