Files
nix/hosts/common/user/configs/gui/kitty/default.nix
Nikolaos Karaolidis d54df170cd Remove impermanence home-manager module
Too many bugs to deal with unfortunately.

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2024-07-31 15:33:04 +03:00

49 lines
1.0 KiB
Nix

{
username ? throw "username argument is required",
}:
{
config,
lib,
pkgs,
...
}:
let
hmConfig = config.home-manager.users.${username};
in
{
environment.persistence."/cache".users.${username}.directories = [
"${hmConfig.xdg.relativeCacheHome}/kitty"
];
home-manager.users.${username} = {
programs.kitty = {
enable = true;
font = {
name = builtins.head hmConfig.theme.font.monospace.names;
package = builtins.head hmConfig.theme.font.monospace.packages;
inherit (hmConfig.theme.font) size;
};
extraConfig = ''
confirm_os_window_close 0
include theme.conf
'';
};
theme = {
templates."${hmConfig.xdg.configHome}/kitty/theme.conf".source = ./theme.conf;
extraConfig = "${
lib.meta.getExe (
pkgs.writeShellApplication {
name = "reload-kitty";
runtimeInputs = with pkgs; [ procps ];
text = "exec pkill kitty -SIGUSR1";
}
)
} &";
};
};
}