Home

dotnix @8d9a644a5ef334f94c862e05b677eb8633f9393a - refs - log -
-
https://git.jolheiser.com/dotnix.git
My nix dotfiles
dotnix / apps / de / gtk.nix
- raw
 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
{
  config,
  lib,
  pkgs,
  ...
}:
{
  home.pointerCursor = {
    name = "catppuccin-cursors";
    package = pkgs.catppuccin-cursors.mochaLavender;
    size = 24;
  };
  gtk = {
    enable = true;
    iconTheme = {
      name = "Papirus-Dark";
      package = pkgs.catppuccin-papirus-folders.override {
        flavor = "mocha";
        accent = "lavender";
      };
    };
    theme = {
      name = "Catppuccin-Mocha-Compact-Lavender-Dark";
      package = pkgs.catppuccin-gtk.override {
        accents = [ "lavender" ];
        variant = "mocha";
        size = "compact";
      };
    };
    gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
    gtk2.extraConfig = ''
      gtk-xft-antialias=1
      gtk-xft-hinting=1
      gtk-xft-hintstyle="hintslight"
      gtk-xft-rgba="rgb"
    '';
    gtk3.extraConfig = {
      gtk-xft-antialias = 1;
      gtk-xft-hinting = 1;
      gtk-xft-hintstyle = "hintslight";
      gtk-xft-rgba = "rgb";
    };
  };

  xdg =
    let
      themeDir = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}";
    in
    lib.mkIf config.gtk.enable {
      configFile = {
        "gtk-4.0/assets" = {
          source = "${themeDir}/gtk-4.0/assets";
          recursive = true;
        };
        "gtk-4.0/gtk.css".source = "${themeDir}/gtk-4.0/gtk.css";
        "gtk-4.0/gtk-dark.css".source = "${themeDir}/gtk-4.0/gtk-dark.css";
      };
    };
}