nixos/home/hyprland/gtk.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

{ config, pkgs, ... }:
let
configure-gtk = pkgs.writeTextFile {
name = "configure-gtk";
destination = "/bin/configure-gtk";
executable = true;
text = let
schema = pkgs.gsettings-desktop-schemas;
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
gtk-theme = config.gtk.theme.name;
icon-theme = config.gtk.iconTheme.name;
cursor-theme = config.gtk.cursorTheme.name;
in ''
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
gnome_schema=org.gnome.desktop.interface
gsettings set $gnome_schema gtk-theme '${gtk-theme}'
gsettings set $gnome_schema icon-theme '${icon-theme}'
gsettings set $gnome_schema cursor-theme '${cursor-theme}'
'';
};
in {
home.packages = with pkgs; [
glib
configure-gtk
gnome.adwaita-icon-theme
papirus-folders
];
gtk = {
enable = true;
cursorTheme = {
2023-09-07 09:08:25 +01:00
package = pkgs.catppuccin-cursors.mochaDark;
name = "Catppuccin-Mocha-Dark-Cursors";
};
iconTheme = {
2023-09-07 09:08:25 +01:00
package = pkgs.catppuccin-papirus-folders;
name = "cat-mocha-lavender";
};
theme = {
2023-09-07 09:08:25 +01:00
name = "Catppuccin-Mocha-Standard-Lavender";
package = pkgs.catppuccin-gtk.override {
accents = [ "lavender" ];
size = "standard";
tweaks = [ ];
variant = "mocha";
};
};
};
}