ctucx.git: nixfiles

ctucx' nixfiles

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 
{ config, pkgs, lib, ... }:

let
  cfg = config.ctucxConfig.programs.alacritty;

in {

  options = {
    ctucxConfig.programs.alacritty = {
      enable = lib.mkEnableOption "alacritty terminal emulator";
    };
  };

  config = lib.mkIf cfg.enable {
    home-manager.users.katja = {
      home = {
        sessionVariables = {
          TERMINAL      = "alacritty";
        };
      };

      programs = {
        alacritty = {
          enable = true;
          settings = {
            window.opacity = 0.9;

            font = {
              size          = 12.0;
              normal.family = "DejaVu Sans Mono";
            };

            colors = {
              primary = {
                background = "0x000000";
                foreground = "0xeaeaea";
              };

              normal = {
                black =   "0x6c6c6c";
                red =     "0xe9897c";
                green =   "0xb6e77d";
                yellow =  "0xecebbe";
                blue =    "0xa9cdeb";
                magenta = "0xea96eb";
                cyan =    "0xc9caec";
                white =   "0xf2f2f2";
              };

              bright = {
                black =   "0x747474";
                red =     "0xf99286";
                green =   "0xc3f786";
                yellow =  "0xfcfbcc";
                blue =    "0xb6defb";
                magenta = "0xfba1fb";
                cyan =    "0xd7d9fc";
                white =   "0xe2e2e2";
              };
            };
          };
        };
      };

      wayland.windowManager.sway = {
        config.terminal = "${pkgs.alacritty}/bin/alacritty";
        extraConfig     = ''
          exec swaymsg 'workspace 3: Term; exec ${pkgs.alacritty}/bin/alacritty; exec ${pkgs.alacritty}/bin/alacritty; workspace 1: Web;'
        '';
      };
    };
  };

}