Reorganize imports
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
47
hosts/common/configs/user/gui/kitty/default.nix
Normal file
47
hosts/common/configs/user/gui/kitty/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
environment.persistence."/cache"."${home}/.cache/kitty" = { };
|
||||
|
||||
home-manager.users.${user} = {
|
||||
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 = {
|
||||
template."${home}/.config/kitty/theme.conf".source = ./theme.conf;
|
||||
|
||||
reloadExtraConfig = "${
|
||||
lib.meta.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "reload-kitty";
|
||||
runtimeInputs = with pkgs; [ procps ];
|
||||
text = "exec pkill kitty -SIGUSR1";
|
||||
}
|
||||
)
|
||||
} &";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user