34 lines
831 B
Nix
34 lines
831 B
Nix
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
|
|
|
let
|
|
hmConfig = config.home-manager.users."${user.name}";
|
|
in
|
|
{
|
|
home-manager.users."${user.name}" = {
|
|
programs.kitty = {
|
|
enable = true;
|
|
extraConfig = ''
|
|
confirm_os_window_close 0
|
|
include theme.conf
|
|
'';
|
|
};
|
|
|
|
programs.matugen.settings.templates = {
|
|
kitty = {
|
|
input_path = ./theme.conf;
|
|
output_path = "${hmConfig.xdg.configHome}/kitty/theme.conf";
|
|
};
|
|
};
|
|
|
|
theme.extraConfig = "${lib.meta.getExe (pkgs.writeShellApplication {
|
|
name = "reload-kitty";
|
|
runtimeInputs = with pkgs; [ procps ];
|
|
text = ''
|
|
pkill kitty -SIGUSR1
|
|
'';
|
|
})} &";
|
|
|
|
home.persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/kitty" ];
|
|
};
|
|
}
|