Implement a kitty module
Squashed commit of the following: commit eb319d25ee2bc60dc4c58f3ee3e70ea2035a2b96 Author: Natsu Kagami <nki@nkagami.me> Date: Fri Jun 10 13:41:33 2022 -0400 Map yen sign to backslash commit 6d29a296ed789ac20bfcd6e74a48536d0e658582 Author: Natsu Kagami <nki@nkagami.me> Date: Fri Jun 10 13:23:30 2022 -0400 Add kitty options commit 47b366cbd0fd17c06c4e415b291e2329f8831939 Author: Natsu Kagami <nki@nkagami.me> Date: Fri Jun 10 11:42:51 2022 -0400 Some basic set up to make kitty happy
This commit is contained in:
parent
05c4fd1fd7
commit
21c8317fd2
7 changed files with 164 additions and 3 deletions
85
home/modules/programs/my-kitty/default.nix
Normal file
85
home/modules/programs/my-kitty/default.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.nki.programs.kitty;
|
||||
|
||||
# iosevka = pkgs.iosevka.override {
|
||||
# privateBuildPlan = ''
|
||||
# [buildPlans.iosevka-kagami]
|
||||
# family = "Iosevka Kagami"
|
||||
# spacing = "normal"
|
||||
# serifs = "sans"
|
||||
# no-cv-ss = true
|
||||
|
||||
# [buildPlans.iosevka-kagami.variants]
|
||||
# inherits = "ss06"
|
||||
|
||||
# [buildPlans.iosevka-kagami.variants.design]
|
||||
# k = "cursive-serifless"
|
||||
|
||||
# [buildPlans.iosevka-kagami.ligations]
|
||||
# inherits = "haskell"
|
||||
# '';
|
||||
# set = "kagami";
|
||||
# };
|
||||
|
||||
cmd = if pkgs.stdenv.isDarwin then "cmd" else "ctrl";
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
imports = [ ./darwin.nix ];
|
||||
|
||||
options.nki.programs.kitty = {
|
||||
enable = mkEnableOption "Enable kitty";
|
||||
|
||||
# font
|
||||
fontSize = mkOption {
|
||||
type = types.int;
|
||||
description = "Font size";
|
||||
default = 21;
|
||||
};
|
||||
|
||||
background = mkOption
|
||||
{
|
||||
type = types.nullOr types.path;
|
||||
description = "Path to the background image. If not set, default to a 0.9 opacity";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
|
||||
config.programs.kitty = mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
font.package = pkgs.fantasque-sans-mono;
|
||||
font.name = "Fantasque Sans Mono";
|
||||
font.size = cfg.fontSize;
|
||||
|
||||
theme = "Ayu Light";
|
||||
|
||||
extraConfig =
|
||||
let
|
||||
background =
|
||||
if isNull cfg.background then ''
|
||||
background_opacity 1
|
||||
dynamic_background_opacity yes
|
||||
'' else ''
|
||||
background_image ${cfg.background}
|
||||
background_image_layout scaled
|
||||
background_tint 0.85
|
||||
'';
|
||||
in
|
||||
''
|
||||
# Background color and transparency
|
||||
${background}
|
||||
|
||||
# Scrollback (128MBs)
|
||||
scrollback_pager_history_size 128
|
||||
|
||||
# Disable Shell integration (leave it for Nix)
|
||||
shell_integration no-rc
|
||||
'';
|
||||
|
||||
keybindings = { };
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue