aboutsummaryrefslogtreecommitdiff
path: root/modules/user/desktop/default.nix
blob: 53911eccd6fe228370d5547347ea638679cbb941 (plain) (blame)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
  config,
  lib,
  pkgs,
  options,
  ...
}:
{
  imports = [
    ./swayfx.nix
  ];

  options.desktop = {
    windowManager = lib.mkOption {
      description = "Which window manager to use";
      default = null;
      type = with lib.types; nullOr (enum [ ]);
    };
  };

  config = {
    fonts.fontconfig.enable = true;
    home = {
      file."Pictures/blossoms.jpg" = {
        enable = (config.desktop.windowManager != null);
        source = ./blossoms.jpg;
      };

      packages = with pkgs; [
        brightnessctl
        fira-code
        keepassxc
        nerd-fonts.fira-code # monospace font
      ];
    };

    programs = {
      foot = {
        enable = lib.mkDefault (config.desktop.windowManager != null);
        settings = {
          bell = {
            notify = true;
            urgent = true;
          };

          colors = {
            alpha = 0.8;
            background = "191724";
            foreground = "e0def4";
            regular0 = "26233a";
            regular1 = "eb6f92";
            regular2 = "9ccfd8";
            regular3 = "f6c177";
            regular4 = "31748f";
            regular5 = "c4a7e7";
            regular6 = "ebbcba";
            regular7 = "e0def4";
            bright0 = "47435d";
            bright1 = "ff98ba";
            bright2 = "c5f9ff";
            bright3 = "ffeb9e";
            bright4 = "5b9ab7";
            bright5 = "eed0ff";
            bright6 = "ffe5e3";
            bright7 = "fefcff";
            flash = "f6c177";
            cursor = "191724 e0def4";
          };

          cursor.blink = true;
          main = {
            dpi-aware = lib.mkDefault true;
            font = lib.mkDefault "FiraCode Nerd Font Mono:size=8";
          };

          mouse.hide-when-typing = true;
        };
      };

      fuzzel = {
        enable = lib.mkDefault (config.desktop.windowManager != null);
        settings = {
          border.width = 2;
          colors = {
            background = "191724ff";
            border = "ebbcbaff";
            input = "e0def4ff";
            match = "ebbcbaff";
            prompt = "e0def4ff";
            selection = "524f67ff";
            selection-match = "ebbcbaff";
            selection-text = "e0def4ff";
            text = "e0def4ff";
          };

          main = {
            dpi-aware = lib.mkDefault true;
            font = lib.mkDefault "Fira Code:size=6";
            show-actions = true;
            sort-result = false;
            terminal = "foot -a '{cmd}' -T '{cmd}' {cmd}";
            use-bold = true;
          };
        };
      };

      librewolf = {
        enable = lib.mkDefault (config.desktop.windowManager != null);
        profiles = {
          default = { };
          noRFP = {
            id = 1;
            settings = {
              "privacy.resistFingerprinting" = false;
              "webgl.disabled" = false;
            };
          };
        };

        settings = {
          "browser.uidensity" = 1;
          "sidebar.animation.enabled" = false;
          "sidebar.new-sidebar.has-used" = true;
          "sidebar.verticalTabs" = true;
          # this keeps getting randomly reset at runtime. why? idfk.
          "sidebar.visibility" = "hide-sidebar";
        };
      };
    };
  };

}