diff --git a/modules/gnome/hm.nix b/modules/gnome/hm.nix index 8a0fdecc..6e34099f 100644 --- a/modules/gnome/hm.nix +++ b/modules/gnome/hm.nix @@ -137,12 +137,17 @@ mkTarget { }; # Enable the extension after logging in. - configFile."autostart/stylix-activate-gnome.desktop".text = '' - [Desktop Entry] - Type=Application - Exec=${lib.getExe activator} enable - Name=Stylix: enable User Themes extension for GNOME Shell - ''; + autostart = { + enable = true; + entries = lib.singleton ( + pkgs.makeDesktopItem { + name = "stylix-activate-gnome"; + desktopName = "Stylix: enable User Themes extension for GNOME Shell"; + exec = "${lib.getExe activator} enable"; + } + + /share/applications/stylix-activate-gnome.desktop + ); + }; }; } ) diff --git a/modules/kde/hm.nix b/modules/kde/hm.nix index ec5614bc..7a3920b5 100644 --- a/modules/kde/hm.nix +++ b/modules/kde/hm.nix @@ -438,13 +438,18 @@ in # This desktop entry will run the theme activator when a new Plasma session is started # Note: This doesn't run again if a new homeConfiguration is activated from a running Plasma session - configFile."autostart/stylix-activate-kde.desktop".text = '' - [Desktop Entry] - Type=Application - Exec=${activator} - Name=Stylix: activate KDE theme - X-KDE-AutostartScript=true - ''; + autostart = { + enable = true; + entries = lib.singleton ( + pkgs.makeDesktopItem { + name = "stylix-activate-kde"; + desktopName = "Stylix: activate KDE theme"; + exec = activator; + extraConfig.X-KDE-AutostartScript = "true"; + } + + /share/applications/stylix-activate-kde.desktop + ); + }; }; }; }