programs/alacritty.nix (view raw)
1{ config
2, pkgs
3, lib
4, ...
5}:
6let
7 isDarwin = lib.strings.hasSuffix "darwin" pkgs.stdenv.hostPlatform.system;
8
9 fontConfig =
10 if isDarwin then {
11 normal = { family = "SF Mono"; style = "Light"; };
12 bold = { family = "SF Mono"; style = "Semibold"; };
13 italic = { family = "SF Mono"; style = "Light Italic"; };
14 size = 15.0;
15 offset.y = 5;
16 }
17 else {
18 normal = { family = "Input"; style = "Regular"; };
19 bold = { family = "Input"; style = "Bold"; };
20 italic = { family = "Input"; style = "Italic"; };
21 size = 12.0;
22 };
23in
24{
25 programs.alacritty = {
26 enable = true;
27 settings = {
28 window = {
29 padding.x = 10;
30 padding.y = 10;
31 dynamic_padding = true;
32 decorations = "None";
33 startup_mode = "Maximized";
34
35
36 option_as_alt = "OnlyLeft";
37 };
38
39 font = fontConfig;
40 cursor.style = "Beam";
41
42
43 colors = {
44 primary = {
45 background = "0xf4f4f4";
46 foreground = "0x676767";
47 };
48 normal = {
49 black = "0xf4f4f4";
50 red = "0xdb7070";
51 green = "0x7c9f4b";
52 yellow = "0xd69822";
53 blue = "0x6587bf";
54 magenta = "0xb870ce";
55 cyan = "0x509c93";
56 white = "0x676767";
57 };
58 bright = {
59 black = "0xaaaaaa";
60 red = "0xc66666";
61 green = "0x6d8b42";
62 yellow = "0xe7e7e7";
63 blue = "0x8a8a8a";
64 magenta = "0xa262b5";
65 cyan = "0x43827b";
66 white = "0x525252";
67 };
68 };
69
70 };
71 };
72}