Simplify wrapper imports

This commit is contained in:
SebastianStork 2024-07-15 19:22:36 +02:00
parent 43c8adddb6
commit 42ebeaf86e
19 changed files with 298 additions and 248 deletions

View file

@ -1,34 +1,38 @@
{ assembleWrapper, moduleArgs, ... }:
let
inherit (moduleArgs) pkgs;
in
{ inputs, pkgs, ... }:
{
theme ? "dark",
}:
assembleWrapper {
basePackage = pkgs.kitty;
programs.kitty.prependFlags =
let
kitty-config = pkgs.writeText "kitty-config" ''
font_family JetBrainsMono Nerd Font
background_opacity 0.85
cursor_shape beam
confirm_os_window_close 0
enable_audio_bell no
update_check_interval 0
'';
theme-file =
{
dark = "default.conf";
light = "GitHub_Light.conf";
}
.${theme};
kitty-theme = "include=${pkgs.kitty-themes}/share/kitty-themes/themes/${theme-file}";
in
[
"--config"
kitty-config
"--override"
kitty-theme
];
}
(inputs.wrapper-manager.lib {
inherit pkgs;
modules = [
{
wrappers.kitty = {
basePackage = pkgs.kitty;
programs.kitty.prependFlags =
let
kitty-config = pkgs.writeText "kitty-config" ''
font_family JetBrainsMono Nerd Font
background_opacity 0.85
cursor_shape beam
confirm_os_window_close 0
enable_audio_bell no
update_check_interval 0
'';
theme-file =
{
dark = "default.conf";
light = "GitHub_Light.conf";
}
.${theme};
kitty-theme = "include=${pkgs.kitty-themes}/share/kitty-themes/themes/${theme-file}";
in
[
"--config"
kitty-config
"--override"
kitty-theme
];
};
}
];
}).config.wrappers.kitty.wrapped