gnome: get extension UUID from package metadata (#1876)

Just a small change to get the UUID from a single source of truth,
rather than hardcoding it. The generated script is exactly the same
as before.

Link: https://github.com/nix-community/stylix/pull/1876

Approved-by: awwpotato <awwpotato@voidq.com>
This commit is contained in:
Daniel Thwaites 2025-09-05 20:14:14 +02:00 committed by GitHub
parent 584d9c57a8
commit 5c34e203c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,6 +70,8 @@ mkTarget {
(
{ inputs, colors }:
let
extension = pkgs.gnomeExtensions.user-themes;
activator = pkgs.writeShellApplication {
name = "stylix-activate-gnome";
text = ''
@ -85,7 +87,7 @@ mkTarget {
}
if gnome_extensions="$(get_exe gnome-extensions)"; then
extension='user-theme@gnome-shell-extensions.gcampax.github.com'
extension=${lib.escapeShellArg extension.passthru.extensionUuid}
case "$1" in
reload)
@ -101,7 +103,7 @@ mkTarget {
};
in
{
home.packages = [ pkgs.gnomeExtensions.user-themes ];
home.packages = [ extension ];
dconf.settings = {
"org/gnome/shell/extensions/user-theme".name = "Stylix";