mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Wrap kitty
This commit is contained in:
parent
f47d5711f3
commit
302a177ef2
4 changed files with 40 additions and 30 deletions
|
|
@ -5,7 +5,6 @@
|
|||
./shell
|
||||
./ssh-client.nix
|
||||
./git.nix
|
||||
./kitty.nix
|
||||
./equalizer
|
||||
./sops.nix
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.kitty.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.kitty.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
font_family = "JetBrainsMono Nerd Font";
|
||||
confirm_os_window_close = 0;
|
||||
background_opacity = "0.85";
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
};
|
||||
|
||||
theme =
|
||||
{
|
||||
dark = "Default";
|
||||
light = "GitHub Light";
|
||||
}
|
||||
.${config.myConfig.de.theme};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -22,7 +22,6 @@
|
|||
ssh-client.enable = true;
|
||||
git.enable = true;
|
||||
vscode.enable = true;
|
||||
kitty.enable = true;
|
||||
equalizer.enable = true;
|
||||
sops.enable = false;
|
||||
};
|
||||
|
|
@ -46,5 +45,6 @@
|
|||
(myWrappers.spotify {disableGPU = true;})
|
||||
(myWrappers.obsidian {disableGPU = true;})
|
||||
(myWrappers.marktext {disableGPU = true;})
|
||||
(myWrappers.kitty {inherit (config.myConfig.de) theme;})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
39
wrappers/kitty.nix
Normal file
39
wrappers/kitty.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
assembleWrapper,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {theme ? "dark"}:
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.kitty;
|
||||
|
||||
appendFlags = let
|
||||
toKittyConfig = lib.generators.toKeyValue {
|
||||
mkKeyValue = key: value: let
|
||||
value' = (
|
||||
if lib.isBool value
|
||||
then lib.hm.booleans.yesNo value
|
||||
else toString value
|
||||
);
|
||||
in "${key} ${value'}";
|
||||
};
|
||||
kitty-config = pkgs.writeText "kitty-config" (toKittyConfig {
|
||||
font_family = "JetBrainsMono Nerd Font";
|
||||
confirm_os_window_close = 0;
|
||||
background_opacity = "0.85";
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
cursor_shape = "beam";
|
||||
});
|
||||
kitty-theme = pkgs.writeText "kitty-theme" "include ${pkgs.kitty-themes}/share/kitty-themes/themes/${{
|
||||
dark = "default.conf";
|
||||
light = "GitHub_Light.conf";
|
||||
}
|
||||
.${theme}}";
|
||||
in [
|
||||
"--config"
|
||||
"${kitty-config}"
|
||||
"--config"
|
||||
"${kitty-theme}"
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue