fix(home-manager): link GTK 4.0 files (#114)

* fix(home-manager): link GTK 4.0 files

* fix(home-manager): add xdg assertion for gtk

* fix(home-manager): fix gtk missing enable check for xdg assert

* fix(home-manager): use string interpolation for gtk directory

* fix(home-manager): fix formatting for gtk.nix
This commit is contained in:
EnzioKam 2024-04-18 23:02:10 +08:00 committed by GitHub
parent 372decb578
commit 4b98726102
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,12 @@ in
};
};
config.gtk = lib.mkIf enable {
config = lib.mkIf enable {
assertions = [
(lib.ctp.assertXdgEnabled "gtk")
];
gtk = {
theme =
let
flavourUpper = ctp.mkUpper cfg.flavour;
@ -62,4 +67,15 @@ in
package = pkgs.catppuccin-cursors.${cfg.cursor.flavour + accentUpper};
};
};
xdg.configFile =
let
gtk4Dir = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0";
in
{
"gtk-4.0/assets".source = "${gtk4Dir}/assets";
"gtk-4.0/gtk.css".source = "${gtk4Dir}/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${gtk4Dir}/gtk-dark.css";
};
};
}