mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 23:11:34 +01:00
Reduce wrapper file count
This commit is contained in:
parent
058d1b38a3
commit
a290812085
8 changed files with 56 additions and 41 deletions
36
wrappers/kitty.nix
Normal file
36
wrappers/kitty.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
{
|
||||
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
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue