forked from
lass.pds.lassul.us/superconfig
This repository has no description
3.0 kB
111 lines
1{ inputs, ... }:
2{
3 perSystem =
4 { pkgs, ... }:
5 let
6 kittyConfig = ''
7 # Font configuration
8 font_family IosevkaTerm Nerd Font
9 bold_font IosevkaTerm Nerd Font Bold
10 italic_font IosevkaTerm Nerd Font Italic
11 bold_italic_font IosevkaTerm Nerd Font Bold Italic
12 font_size 12
13
14 # Window settings
15 initial_window_width 80c
16 initial_window_height 20c
17
18 # Enable remote control for runtime theme switching
19 allow_remote_control yes
20 listen_on unix:/tmp/kitty-socket
21
22 # Include theme colors from /var/theme/config
23 include /var/theme/config/kitty-colors.conf
24
25 # URL handling
26 open_url_with /run/current-system/sw/bin/xdg-open
27 detect_urls yes
28
29 # Disable bell
30 enable_audio_bell no
31
32 # Don't reset the terminal on ctrl+shift+delete; it's too close to
33 # shift+insert (paste) and the reset scrambles running programs.
34 map ctrl+shift+delete no_op
35 '';
36
37 # kitty only recognises `+kitten` as its first argument, so the config
38 # must not be injected via `--config`: that would turn `kitty +kitten
39 # icat` (nnn's image preview) into a terminal window trying to exec a
40 # program called `+kitten`. KITTY_CONFIG_DIRECTORY leaves argv alone.
41 configDir = pkgs.writeTextDir "kitty.conf" kittyConfig;
42
43 # Color files consumed by switch-theme (configs/themes.nix) via
44 # /etc/themes/<name>/kitty-colors.conf.
45 themes = {
46 # Gruvbox Light
47 light = ''
48 foreground #3c3836
49 background #f9f5d7
50
51 cursor #3c3836
52 cursor_text_color #f9f5d7
53
54 # Normal colors
55 color0 #fbf1c7
56 color1 #cc241d
57 color2 #98971a
58 color3 #d79921
59 color4 #458588
60 color5 #b16286
61 color6 #689d6a
62 color7 #7c6f64
63
64 # Bright colors
65 color8 #928374
66 color9 #9d0006
67 color10 #79740e
68 color11 #b57614
69 color12 #076678
70 color13 #8f3f71
71 color14 #427b58
72 color15 #3c3836
73 '';
74 dark = ''
75 foreground #ffffff
76 background #000000
77
78 cursor #ffffff
79 cursor_text_color #F81CE5
80
81 # Normal colors
82 color0 #000000
83 color1 #fe0100
84 color2 #33ff00
85 color3 #feff00
86 color4 #0066ff
87 color5 #cc00ff
88 color6 #00ffff
89 color7 #d0d0d0
90
91 # Bright colors
92 color8 #808080
93 color9 #fe0100
94 color10 #33ff00
95 color11 #feff00
96 color12 #0066ff
97 color13 #cc00ff
98 color14 #00ffff
99 color15 #FFFFFF
100 '';
101 };
102 in
103 {
104 packages.kitty = inputs.wrappers.lib.wrapPackage {
105 inherit pkgs;
106 package = pkgs.kitty;
107 env.KITTY_CONFIG_DIRECTORY = "${configDir}";
108 passthru = { inherit themes; };
109 };
110 };
111}