Update and unlock the tinted-kitty input because the issue from commit
f95022bb6e ("stylix: downgrade and lock tinted-kitty input (#589)")
seems to have resolved itself.
Link: https://github.com/nix-community/stylix/pull/1308
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
36 lines
1,022 B
Nix
36 lines
1,022 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.stylix.targets.kitty;
|
|
theme = config.lib.stylix.colors {
|
|
templateRepo = config.stylix.inputs.tinted-kitty;
|
|
target = if cfg.variant256Colors then "base16-256-deprecated" else "base16";
|
|
};
|
|
in
|
|
{
|
|
options.stylix.targets.kitty = {
|
|
enable = config.lib.stylix.mkEnableTarget "Kitty" true;
|
|
|
|
variant256Colors = lib.mkOption {
|
|
description = ''
|
|
Whether to use the [256-color variant](https://github.com/kdrag0n/base16-kitty#256-color-variants)
|
|
rather than the default combination of colors.
|
|
'';
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf (config.stylix.enable && cfg.enable) {
|
|
programs.kitty = {
|
|
font = {
|
|
inherit (config.stylix.fonts.monospace) package name;
|
|
size = config.stylix.fonts.sizes.terminal;
|
|
};
|
|
settings.background_opacity = "${builtins.toString config.stylix.opacity.terminal}";
|
|
extraConfig = ''
|
|
include ${theme}
|
|
'';
|
|
};
|
|
};
|
|
}
|