aboutsummaryrefslogtreecommitdiff
path: root/modules/desktop/system/programs/alacritty.nix
blob: f73a901a4c3fc6f30a5bdf3488db6cb5a6aef937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
  pkgs,
  config,
  lib,
  ...
}: let
  cfg = config.collinux.desktop.programs.alacritty;
in
  lib.mkIf cfg.enable {
    hjem.users."${config.collinux.user.name}" = {
      files.".config/alacritty/alacritty.toml" = {
        value = {
          general = {
            import = ["keys.toml" "colors.toml"];
            live_config_reload = true;
          };
          font = {
            normal.family = "Iosevka Nerd Font";
            size = 12;
          };
        };
        generator = (pkgs.formats.toml {}).generate "alacritty.toml";
      };

      files.".config/alacritty/colors.toml".text = ''
        [colors]
        draw_bold_text_with_bright_colors = false

        # Default colors
        [colors.primary]
        background = '#242424'
        foreground = '#C5C6C5'

        # Colors the cursor will use if `custom_cursor_colors` is true
        [colors.cursor]
        text = '#2D3234'
        cursor = '#C5C6C5'

        # Normal colors
        [colors.normal]
        black = '#2D3234'
        red = '#FFA500'
        green = '#6FEE91'
        yellow = '#91EE6F'
        blue = '#916FB4'
        magenta = '#EE6F91'
        cyan = '#6F91B4'
        white = '#C5C6C5'

        # Bright colors
        [colors.bright]
        black = '#566164'
        red = '#FFFF60'
        green = '#33393B'
        yellow = '#4B5356'
        blue = '#919494'
        magenta = '#D3D4D5'
        cyan = '#EE6F6F'
        white = '#EEEEEC'
      '';

      files.".config/alacritty/keys.toml".text = ''
        [[keyboard.bindings]]
        chars = "\u001b[27;5;9~"
        key = "Tab"
        mods = "Control"

        [[keyboard.bindings]]
        chars = "\u001b[27;5;13~"
        key = "Enter"
        mods = "Control"
      '';

      packages = [pkgs.alacritty];
    };
  }