Skip to content

modules/decky-loader: Add experimental decky-plugins support#500

Open
YvesStraten wants to merge 10 commits intoJovian-Experiments:developmentfrom
YvesStraten:decky-plugins
Open

modules/decky-loader: Add experimental decky-plugins support#500
YvesStraten wants to merge 10 commits intoJovian-Experiments:developmentfrom
YvesStraten:decky-plugins

Conversation

@YvesStraten
Copy link

@YvesStraten YvesStraten commented Apr 2, 2025

This PR introduces 3 changes:

  1. Adds a generator to generate nix derivations from decky plugins on the official decky store
  • And devshell
  1. Adds appropriate CI for the generator
  2. Adds module options for installing plugins

There are 2 caveats to this however:

  1. Plugins which use non-standard plugin packaging, e.g. Fantastic, do not work out of the box, these will need to be overrided in the ./override.nix file
  2. Some plugins which need root access, such as Quick launch do not seem to work properly, although their backends work
  3. Decky loader has to be restarted to pick up changes, or else it crashes. I have not found a way to restart the loader when changing its plugin via tmpfiles, if there are any, please tell me

Tests:
I have tested 2 plugins right on my steam deck, Css_loader and Simple timer, after doing point 3 above, they work flawlessly. However, it would be nice if further testing could be undertaken.

@YvesStraten YvesStraten marked this pull request as draft April 2, 2025 05:18
@YvesStraten
Copy link
Author

YvesStraten commented Apr 2, 2025

Converting to draft, decky loader crashes too much, seems to be related to this:

The Tab SharedJSContext socket has been disconnected while listening

and this (I can't get the full trace from within gamemode)

eFeature

Which then causes CEF to crash

@YvesStraten YvesStraten changed the title Add experimental decky-plugins support modules/decky-loader: Add experimental decky-plugins support Apr 4, 2025
@Skullman-G
Copy link

Hey. Are you still working on this? I'll gladly help.

@YvesStraten
Copy link
Author

I still am, and for the most part, it should be finished. The only thing that remains in the way is Decky being unstable. I have the feeling that it is either related to me using systemd tmpfiles to make symlinks or the fact that Decky doesn't like symlinks. I should be able to open the PR for collaboration. Allow me to see.

@YvesStraten
Copy link
Author

Is open for edits

@Skullman-G
Copy link

Skullman-G commented Aug 22, 2025

I made a fork of your fork for testing it out alongside the newer commits that have been added to jovian nixos. From what I currently tested, it seemed to work well. A system restart was needed to make decky loader show the updated plugin list, but other than that the plugins seemed to work. But I'm gonna test more. Maybe run the plugins update command while I'm at it.

But good work honestly!

@YvesStraten
Copy link
Author

I made a fork of your fork for testing it out alongside the newer commits that have been added to jovian nixos. From what I currently tested, it seemed to work well. A system restart was needed to make decky loader show the updated plugin list, but other than that the plugins seemed to work. But I'm gonna test more. Maybe run the plugins update command while I'm at it.

But good work honestly!

@Skullman-G Thanks for testing for me further. I am happy to hear that so far, everything seems to work as expected. I will try to test, but might not be able to as to update I need to rebuild the entire steam deck kernel, which on a 16 core machine takes 1hr +. I will reopen this PR, as maybe the crashing was just for my steam client.

@YvesStraten YvesStraten marked this pull request as ready for review August 23, 2025 17:09
@Skullman-G
Copy link

Skullman-G commented Aug 24, 2025

I was experimenting with the hot reload feature for decky loader a bit to see if we could use it with nix so that we wouldn't have to restart the system everytime. But even when I'm not using nix and only copy and paste the plugin folders in and out, it sometimes detects when plugins get added, but it does not realize when they are getting removed. So I guess it's not an issue with symlinks.

@YvesStraten
Copy link
Author

I was experimenting with the hot reload feature for decky loader a bit to see if we could use it with nix so that we wouldn't have to restart the system everytime. But even when I'm not using nix and only copy and paste the plugin folders in and out, it sometimes detects when plugins get added, but it does not realize when they are getting removed. So I guess it's not an issue with symlinks.

Yeah that's what I have noticed as well. A reload of the steam deck UI is needed for Decky to realize that plugins have been removed

@YvesStraten
Copy link
Author

Updated fork

@Skullman-G
Copy link

I created an issue in decky loader to see if it would be possible to implement the reloading feature there but they said that removing plugins directly from the folder is unsave because the plugin needs to do a cleanup procedure first. I wonder if we could make that work through the nix configuration. On the other hand, maybe the rebuild of nixos already takes care of the cleanup.

@YvesStraten
Copy link
Author

I now have had time with testing my fork with new changes from Jovian. At least css loader and proton db badges work flawlessly. The problems seem to be gone.

@YvesStraten
Copy link
Author

I am not sure whether this is related, the mouse pads of the deck seem to not actively request for permission anymore (might be completely unrelated)

@YvesStraten YvesStraten force-pushed the decky-plugins branch 3 times, most recently from 309a786 to 165e1e7 Compare December 23, 2025 10:40
@bentenjamin
Copy link

Just ran into this issue today, excited to see you still working on this :D

@YvesStraten
Copy link
Author

Just ran into this issue today, excited to see you still working on this :D

Thanks. Its mostly just updates to make it closer to upstream. However, I feel like it is now stable enough to be merged.

@YvesStraten
Copy link
Author

@K900 I think this should be good to go. Could this please be merged? Thanks a lot in advance. Happy new year to everyone as well!

@K900
Copy link
Contributor

K900 commented Dec 29, 2025

I still need to actually look at the code, especially given my Haskell is uhh rusty (heh).

@YvesStraten
Copy link
Author

I still need to actually look at the code, especially given my Haskell is uhh rusty (heh).

No problem, I was not aware of this. Take your time. I've tried to make it as clean as possible, although that was my first time I had ever used haskell

@HayyaSylvy
Copy link

Hi, I've been testing these commits on a fork with the latest commits from the main project and it seems to be pretty stable in so far. But I also noticed that CSS Loader themes are being downloaded to /var/lib/decky-loader/themes for some reason, would it possible to configure these in a declarative way as well?

@YvesStraten
Copy link
Author

Hi, I've been testing these commits on a fork with the latest commits from the main project and it seems to be pretty stable in so far. But I also noticed that CSS Loader themes are being downloaded to /var/lib/decky-loader/themes for some reason, would it possible to configure these in a declarative way as well?

Hey, sorry for the astronomically late reply. To answer your question, unfortunately no. The generator is needed to get the hashes for the plugins so that nix can download them declaratively, and because of themes not being handled, nix does not know how to fetch them.

I unfortunately do not have time right now to take care of this as I mostly take care of projects like these during my free time off university. However, if you know Haskell, or any other language with which you can make derivations out of the themes, you are more than welcome to make a fork of my fork or a fork from the main project and implement it there.

Feel free to take inspiration from my generator if you wish to. Hope that this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants