the-argus / spicetify-nix

A nix flake for configuring spicetify. Includes packaging for many popular themes and extensions.
GNU General Public License v3.0
138 stars 22 forks source link

experimental_features option not respected #35

Closed aemogie closed 1 month ago

aemogie commented 1 year ago

Hey, I'm new to nix, and I really don't understand much of the code. But, this line seems to be setting experimental_features to needExperimental, which is false if none of the extensions need experimental features. https://github.com/the-argus/spicetify-nix/blob/48dd31ec1d13638d0818349a9f9a2463f29c9a2a/lib/xpui-builder.nix#L46 And from what I understand, this config overwrites the user configuration, so the user basically has no control over this property. I am not sure if that is indeed how this works, but setting programs.spicetify.xpui.AdditionalOptions.experimental_features to true did nothing on my machine. I checked the build output's config-xpu.ini in my nix store, and it also verifies this. image

aemogie commented 1 year ago

As a workaround, I am creating a dummy extension with experimentalFeatures enabled, which seems to work.

programs.spicetify.enabledExtensions = [
  (let
    dummy = builtins.toFile "dummy.js" "";
  in { 
    src = builtins.dirOf dummy;
    filename = builtins.baseNameOf dummy;
    experimentalFeatures = true;
  })
];
the-argus commented 10 months ago

@aemogie The intended method of using experimentalFeatures is to have extensions require it, and then enable it because of those (as opposed to having the user enable it directly like you were trying to do with programs.spicetify.xpui.AdditionalOptions.experimental_features. It is a bit inconsistent that you can override injectCss and etc but not experimental features, but otherwise I don't think its a problem.

Why are you trying to enable experimental features? As far as I know, its only needed by certain extensions in which case you just need to set up the extension to have it set to true.

aemogie commented 10 months ago

I think I was trying to enable the feature which shows lyrics in the sidebar, or changes colour based on album art. Plus, maybe some other stuff, can't remember.

I guess I should look at spicetify docs to see how I can enable it through an extension, because that would be declarative as well.

But I thought all the option did was, expose the "Experimental Features" option in the menu. I guess I was wrong.

the-argus commented 1 month ago

Unfortunately I am unsure if that is the case or not- and now I am archiving this repository and don't have time to investigate. Please try the new flake https://github.com/Gerg-L/spicetify-nix and see if they have fixed any option inconsistencies I may have created here.