Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(home-manager/gtk): add gnome option #161

Merged
merged 4 commits into from
May 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions modules/home-manager/gtk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ in
default = [ "normal" ];
description = "Catppuccin tweaks for gtk";
};
gnome = mkOption {
type = lib.types.bool;
default = false;
description = "Wether to use the gtk theme as gnome shell's theme";
};
c-leri marked this conversation as resolved.
Show resolved Hide resolved

cursor = ctp.mkCatppuccinOpt "gtk cursors"
// {
Expand Down Expand Up @@ -79,5 +84,25 @@ in
"gtk-4.0/gtk.css".source = "${gtk4Dir}/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${gtk4Dir}/gtk-dark.css";
};

home.packages = lib.mkIf cfg.gnome [pkgs.gnomeExtensions.user-themes];

dconf.settings = lib.mkIf cfg.gnome {
getchoo marked this conversation as resolved.
Show resolved Hide resolved
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = [
"[email protected]"
];
};
"org/gnome/shell/extensions/user-theme" = {
name = config.gtk.theme.name;
};
"org/gnome/desktop/interface" = {
color-scheme =
if cfg.flavour == "latte"
then "default"
else "prefer-dark";
};
};
};
}