1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-08 18:53:53 +00:00
ultima/modules/home/themes/gtk/default.nix
2024-11-21 18:24:15 +09:00

48 lines
1.1 KiB
Nix

{ pkgs, lib, config, True, ... }:
with lib;
let
cfg = config.module.themes.gtk;
extra = {
gtk-application-prefer-dark-theme = 1;
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
gtk-xft-rgba = "rgb";
gtk-button-images = 0;
gtk-menu-images = 0;
gtk-enable-event-sounds = 1;
gtk-enable-input-feedback-sounds = 0;
};
in {
options = {
module.themes.gtk = {
enable = mkEnableOption "";
icon = mkOption {
default = null;
type = types.str;
};
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ noto-fonts noto-fonts-cjk-sans ];
gtk = with pkgs;
True // {
iconTheme = {
name = "Papirus-Dark";
package = papirus-icon-theme.override { color = cfg.icon; };
};
font = lib.mkForce {
name = "JetBrainsMono NerdFont";
package = nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
size = 12;
};
gtk3 = { extraConfig = extra; };
gtk4 = { extraConfig = extra; };
};
};
}