stylix/modules/gtk/hm.nix
2023-01-30 22:56:57 +01:00

29 lines
671 B
Nix

{ pkgs, config, lib, ... }:
let
css = config.lib.stylix.colors {
template = builtins.readFile ./gtk.mustache;
extension = "css";
};
in {
options.stylix.targets.gtk.enable =
config.lib.stylix.mkEnableTarget "all GTK3, GTK4 and Libadwaita apps" true;
config = lib.mkIf config.stylix.targets.gtk.enable {
# programs.dconf.enable = true; required in system config
gtk = {
enable = true;
font = config.stylix.fonts.sansSerif;
theme = {
package = pkgs.adw-gtk3;
name = "adw-gtk3";
};
};
xdg.configFile = {
"gtk-3.0/gtk.css".source = css;
"gtk-4.0/gtk.css".source = css;
};
};
}