mirror of
https://github.com/danth/stylix
synced 2024-11-27 14:41:08 +00:00
52f614b536
Rather than changing the GTK theme, we now use the default Adwaita theme with modified colours. This creates a consistent look across all GTK3, GTK4 and Libadwaita apps. TODO: Gnome shell theme
33 lines
767 B
Nix
33 lines
767 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 {
|
|
# Required for Home Manager's GTK settings to work
|
|
programs.dconf.enable = true;
|
|
|
|
home-manager.sharedModules = [{
|
|
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;
|
|
};
|
|
}];
|
|
};
|
|
}
|