Refactor theme module

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-07-27 16:23:32 +01:00
parent 4c04dda643
commit 922eb479a0
13 changed files with 871 additions and 903 deletions

View File

@@ -13,37 +13,34 @@ let
in
{
home-manager.users.${username} = {
programs = {
kitty = {
enable = true;
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
'';
font = {
name = builtins.head hmConfig.theme.font.monospace.names;
package = builtins.head hmConfig.theme.font.monospace.packages;
inherit (hmConfig.theme.font) size;
};
matugen.settings.templates.kitty = {
input_path = ./theme.conf;
output_path = "${hmConfig.xdg.configHome}/kitty/theme.conf";
};
extraConfig = ''
confirm_os_window_close 0
include theme.conf
'';
};
theme.extraConfig = "${
lib.meta.getExe (
pkgs.writeShellApplication {
name = "reload-kitty";
runtimeInputs = with pkgs; [ procps ];
text = "exec pkill kitty -SIGUSR1";
}
)
} &";
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";
}
)
} &";
};
home.persistence."/cache${userConfig.home}".directories = [
"${hmConfig.xdg.relativeCacheHome}/kitty"