GithubHelp home page GithubHelp logo

the-argus / spicetify-nix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pietdevries94/spicetify-nix

105.0 2.0 17.0 196 KB

A nix flake for configuring spicetify. Includes packaging for many popular themes and extensions.

License: GNU General Public License v3.0

Nix 100.00%
home-manager nix nixos spicetify

spicetify-nix's Introduction

Spicetify-Nix

Modifies Spotify using spicetify-cli.

spicetify-themes are included and available.

Usage

To use, add this flake to your home-manager configuration flake inputs, like so:

{
  # create an input called spicetify-nix, and set its url to this repository
  inputs.spicetify-nix.url = "github:the-argus/spicetify-nix";
}

And when writing your outputs function, make sure to accept spicetify-nix (or whatever you chose to call it in the inputs) as a function input:

{
    outputs = { nixpkgs, spicetify-nix, ...}: let # notice spicetify-nix here
        pkgs = import nixpkgs { system = "x84_64-linux"; };
    in {
      homeConfigurations."your_username" = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;
        extraSpecialArgs = {inherit spicetify-nix;};
        modules = [
            ./home.nix
            ./spicetify.nix # file where you configure spicetify
        ];
      };
    }
}

An even more general solution is available, though, which isn't necessary but is recommended, as it will prevent you from having to manually put all other flake inputs you may add in the future to extraSpecialArgs. You can make a variable which contains all of your flake inputs, no matter what you change them to, and just pass that to extraSpecialArgs. Home manager even has a reserved argument inside of extraSpecialArgs for that: inputs.

{
    # the ... lets us accept any inputs, and "@ inputs" lets us capture those.
    outputs = { nixpkgs, ...} @ inputs: let     
        # here we use nixpkgs from our inputs, which is why why included it
        # above instead of just {...} @ inputs. If we did that, this would be
        # "inputs.nixpkgs".
        pkgs = import nixpkgs { system = "x86_64-linux"; };
    in {
      homeConfigurations."your_username" = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;
        # put our flake inputs into the "inputs" argument of extraSpecialArgs.
        extraSpecialArgs = {inherit inputs;};
        modules = [
            ./home.nix
            ./spicetify.nix # file where you configure spicetify
        ];
      };
    }
}

For more information on the (many) different ways of passing flake inputs to modules can be found in this wonderful blog post by Nobbz

If you want to do it as a NixOS module instead of a home-manager module, the process is the same except you use specialArgs instead of extraSpecialArgs in nixpkgs.lib.nixosSystem. Also be sure to import spicetify-nix.nixosModule instead of spicetify-nix.homeManagerModule, which you'll see happen in then next section.

Configuration examples

Here are two examples of files which configure spicetify when imported into a user's home-manager configuration.

Minimal Configuration

{ pkgs, lib, spicetify-nix, ... }:
let
  spicePkgs = spicetify-nix.packages.${pkgs.system}.default;
in
{
  # allow spotify to be installed if you don't have unfree enabled already
  nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
    "spotify"
  ];

  # import the flake's module for your system
  imports = [ spicetify-nix.homeManagerModule ];

  # configure spicetify :)
  programs.spicetify =
    {
      enable = true;
      theme = spicePkgs.themes.catppuccin;
      colorScheme = "mocha";

      enabledExtensions = with spicePkgs.extensions; [
        fullAppDisplay
        shuffle # shuffle+ (special characters are sanitized out of ext names)
        hidePodcasts
      ];
    };
}

Maximal configuration

NOTE: the purpose of this configuration is to demonstrate all the possible customization options. It's not sane at all, and I see no reason why you should actually use this one.

{
  pkgs,
  # this is the same as pkgs but the url is github:nixos/nixpkgs-unstable
  unstable,
  # this is pkgs.lib
  lib,
  # this is the input to the flake with url github:the-argus/spicetify-nix
  spicetify-nix,
  ...
}:
let
  spicePkgs = spicetify-nix.packages.${pkgs.system}.default;
in
{
  # allow spotify to be installed if you don't have unfree enabled already
  nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
    "spotify"
  ];

  # import the flake's module
  imports = [ spicetify-nix.homeManagerModules.default ];

  # configure spicetify :)
  programs.spicetify =
    let
      # use a different version of spicetify-themes than the one provided by
      # spicetify-nix
      officialThemesOLD = pkgs.fetchgit {
        url = "https://github.com/spicetify/spicetify-themes";
        rev = "c2751b48ff9693867193fe65695a585e3c2e2133";
        sha256 = "0rbqaxvyfz2vvv3iqik5rpsa3aics5a7232167rmyvv54m475agk";
      };
      # pin a certain version of the localFiles custom app
      localFilesSrc = pkgs.fetchgit {
        url = "https://github.com/hroland/spicetify-show-local-files/";
        rev = "1bfd2fc80385b21ed6dd207b00a371065e53042e";
        sha256 = "01gy16b69glqcalz1wm8kr5wsh94i419qx4nfmsavm4rcvcr3qlx";
      };
    in
    {
      # use spotify from the nixpkgs master branch
      spotifyPackage = unstable.spotify;

      # use a custom build of spicetify
      spicetifyPackage = pkgs.spicetify-cli.overrideAttrs (oa: rec {
        pname = "spicetify-cli";
        version = "2.14.1";
        src = pkgs.fetchgit {
          url = "https://github.com/spicetify/${pname}";
          rev = "v${version}";
          sha256 = "sha256-262tnSKX6M9ggm4JIs0pANeq2JSNYzKkTN8awpqLyMM=";
        };
        vendorSha256 = "sha256-E2Q+mXojMb8E0zSnaCOl9xp5QLeYcuTXjhcp3Hc8gH4=";
      });

      # actually enable the installation of spotify and spicetify
      enable = true;

      # custom Dribbblish theme
      theme = {
        name = "Dribbblish";
        src = officialThemesOLD;
        requiredExtensions = [
          # define extensions that will be installed with this theme
          {
            # extension is "${src}/Dribbblish/dribbblish.js"
            filename = "dribbblish.js";
            src = "${officialThemesOLD}/Dribbblish";
          }
        ];
        appendName = true; # theme is located at "${src}/Dribbblish" not just "${src}"

        # changes to make to config-xpui.ini for this theme:
        patches = {
          "xpui.js_find_8008" = ",(\\w+=)32,";
          "xpui.js_repl_8008" = ",$\{1}56,";
        };
        injectCss = true;
        replaceColors = true;
        overwriteAssets = true;
        sidebarConfig = true;
      };

      # specify that we want to use our custom colorscheme
      colorScheme = "custom";

      # color definition for custom color scheme. (rosepine)
      customColorScheme = {
        text = "ebbcba";
        subtext = "F0F0F0";
        sidebar-text = "e0def4";
        main = "191724";
        sidebar = "2a2837";
        player = "191724";
        card = "191724";
        shadow = "1f1d2e";
        selected-row = "797979";
        button = "31748f";
        button-active = "31748f";
        button-disabled = "555169";
        tab-active = "ebbcba";
        notification = "1db954";
        notification-error = "eb6f92";
        misc = "6e6a86";
      };

      enabledCustomApps = with spicePkgs.apps; [
        new-releases
        {
          name = "localFiles";
          src = localFilesSrc;
          appendName = false;
        }
      ];
      enabledExtensions = with spicePkgs.extensions; [
        playlistIcons
        lastfm
        genre
        historyShortcut
        hidePodcasts
        fullAppDisplay
        shuffle
      ];
    };
}

Themes, Extensions, and CustomApps

Are found in THEMES.md, EXTENSIONS.md, and CUSTOMAPPS.md, respectively.

macOS

This package has no macOS support, because Spotify in nixpkgs has no macOS support.

spicetify-nix's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

spicetify-nix's Issues

Genre extension broken

Describe the bug
When including the genre extension, the build fails.

My config

{inputs, ...}: {
  imports = [ inputs.spicetify.homeManagerModule ];

  programs.spicetify = {
    enable = true;

    enabledExtensions = with inputs.spicetify.packages.x86_64-linux.default.extensions; [
      genre
    ];
  };
}

Desktop (please complete the following information):

  • OS/distro: NixOS unstable
  • Desktop environment/window manager: Hyprland
  • nixpkgs version for my home configuration: unstable
  • nixpkgs version for my import of spicetify nix: same as above

Additional context
When trying to rebuild my home manager config, this is the trace that appears:

warning: Git tree '/etc/nixos' is dirty
warning: Git tree '/etc/nixos' is dirty
warning: Git tree '/etc/nixos' is dirty
error: builder for '/nix/store/qz72kbwxrl1lzxghd4gadfmgh5gn10pj-Spicetify-Genre-f2cb950.drv' failed with exit code 1;
       last 6 log lines:
       > exporting https://github.com/Shinyhero36/Spicetify-Genre (rev f2cb950a7e27cce3bfd4168141b5c5e55552df5a) into /nix/store/9sqg2p5n437j1dclmiwm82qa39vzrkkq-Spicetify-Genre-f2cb950
       > Initialized empty Git repository in /nix/store/9sqg2p5n437j1dclmiwm82qa39vzrkkq-Spicetify-Genre-f2cb950/.git/
       > fatal: could not read Username for 'https://github.com': No such device or address
       > fatal: could not read Username for 'https://github.com': No such device or address
       > fatal: could not read Username for 'https://github.com': No such device or address
       > Unable to checkout f2cb950a7e27cce3bfd4168141b5c5e55552df5a from https://github.com/Shinyhero36/Spicetify-Genre.
       For full logs, run 'nix log /nix/store/qz72kbwxrl1lzxghd4gadfmgh5gn10pj-Spicetify-Genre-f2cb950.drv'.
error: 1 dependencies of derivation '/nix/store/clfgr6ibm2dndbszh0q56h7s6di0dgq4-spicetify-Default.drv' failed to build
error: 1 dependencies of derivation '/nix/store/f1907q3i52qg8iab9zsfgpjav0l74y7g-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/i0bzqz4vivnl0z403g9m09km75678m4q-home-manager-generation.drv' failed to build

The error message led me to check out the url causing the error (https://github.com/Shinyhero36/Spicetify-Genre) in my browser and turns it returns a 404. The plugin author probably deleted, moved, or made the plugin repository private.

Remove empty space at the top of Dribbblish

Dribbblish has a gap at the top of the theme to make room for the overlapping window controls on Windows. This is not applicable on my linux system, where I use a tiling WM and don't even have window controls, much less overlapping ones. So this issue is up to some interpretation. The best solution would probably be to add some sort of option... (would be nice if I had used callPackage for the packages so we could get override, but that's out of scope of this issue). Alternatively, we could just confirm that the gap should be removed on KDE on linux (maybe confirm gnome as well, but I imagine it's the same) and then do it universally.

As for actually removing the gap, there is a CSS snippet out there somewhere, I'm pretty sure. I think I did it on arch before I ever used nix.

spotifywm not working

I'm using pkgs.spotifywm rather than pkgs.spotify, which sets the window title class to "Spotify" before loading the spotify window. I was hoping it would be as easy as setting spotifyPackage = pkgs.spotifywm; but this doesn't seem to do the trick - the client launches but without any themeing.

Thanks for any help, my hm config is here:

{pkgs, spicetify-nix, ...}:
{
  imports = [
    spicetify-nix.homeManagerModule
  ];
  programs.spicetify = {
    enable = true;
    spotifyPackage = pkgs.spotifywm; 
    theme = "catppuccin-mocha";
    colorScheme = "flamingo";

    enabledExtensions = [
      "fullAppDisplay.js"
      "songStats.js"
      "keyboardShortcut.js"
      "fullAlbumDate.js"
      "wikify.js"
      "history.js"
      "genre.js"
    ];
  };
}

Lyrics plus app shows "Something went wrong"

Describe the bug
When using the lyrics plus app, Spotify shows "Something went wrong" error.

My config

    hm.programs.spicetify = {
      enable = true;

      enabledCustomApps = with spicetifyPkgs.apps; [ lyrics-plus ];
    };

Screenshots
image

Desktop (please complete the following information):

  • OS/distro: NixOS 23.11 (https://github.com/diogotcorreia/dotfiles)
  • Desktop environment/window manager: DWM
  • nixpkgs version for my home configuration: 23.11
  • nixpkgs version for my import of spicetify nix: "same as above"

Additional context
I'm guessing this is some kind of version incompatibility between the version of spotify and spicetify, since spicetify seems to be quite outdated.

Related issue: spicetify/spicetify-cli#2672

Note: this has not been working for a while, I just haven't had to the patience to report it since I don't use the Spotify desktop app that much.

Update Catppuccin Theme

Description of the suggestion

The catppuccin theme had a major refactor recently, and contains breaking changes. (catppuccin/spicetify#48)

Note: Possibly depends on #40, as it uses inject_theme_js now. But, as the default is with the option enabled, maybe not.

Changes that affect spicetify-nix

  • The sub directory is now just catppuccin instead of catppuccin-{flavour}.
  • The colour schemes are no longer the accents, but rather the flavours.
  • No longer requires a requiredExtensions attribute.

My configuration

theme = {
  name = "catppuccin";
  appendName = true;
  src = pkgs.fetchFromGitHub {
    owner = "catppuccin";
    repo = "spicetify";
    rev = "dc3d4b24dcdd2fc3a8aa716d6280047c1928c029";
    sha256 = "sha256-XqsPnr0BiTHKgz6G6YOPT8+iSJMxkKHD2MEJBVdZk6w=";
  };
  injectCss = true;
  replaceColors = true;
  overwriteAssets = true;
  sidebarConfig = false;
};
colorScheme = "mocha";

Local Files & Lyrics Integration Results in Crashes

Describe the bug

The application encounters a complete crash when either attempting to add a local files directory or when loading song lyrics from a file.

Troubleshooting Attempts

I have tried the following code snippet in an effort to resolve the issue, but it has proven unsuccessful:

{          
   name = "localFiles";          
   src = "${config.home.homeDirectory}/Music";          
   appendName = false;        
}

I can't deny the possibility of my window or file manager to be the center of the issue. Nevertheless, I'm not sure why the above snippet isn't working as intended. Perhaps there's something I'm overlooking.

Desktop

  • OS/distro: NixOS
  • Desktop environment/window manager: Hyprland
  • nixpkgs version for my home configuration: unstable
  • nixpkgs version for my import of spicetify nix: unstable

Cannot add Command Line Arguments to Spotify

Describe the bug
Goal
I trying to add the --enable-wayland-ime command line flag to Spotify so that I get fcitx5 to work with under wayland. I already know that my Spotify will work with this command on fctix5 as I have tested it in the terminal as spotify --enable-wayland-ime.

Non-Ideal Solution
I could configure my desktop environment so that it adds the command line argument to Spotify but this is not ideal. As I am trying to create a modular setup so I would I have this command line argument to each desktop environment in each desktop environment module/config.

Reason
It would be much better if there was was a way to add command line argument to package created by spicetify-nix. I am not entirely sure how to do this however I know that is possible as you can wrap packages with flags.

My Attempt
In my configuration I am trying to wrap the Spotify package from nixos with command line flag --enable-wayland-ime. This config compiles and installs Spotify with the --enable-wayland-ime flag. However there is a problem.

The Issue
The problem is that when I run Spotify as spotify, Spotify will open but none of the spicetify configurations are applied. I do not know why this is however I did notice that the spicetify-nix create it's on Spotify wrapper. I don't know if these wrappers are conflicting or my config is just wrong. I do not really understand the wrapper code very well.

It would be great if someone could help me fix my config to get my desired goal or let me know if it is possible to a config option to the spicetify-nix that adds command line arguments to the final package. Like I said earlier I know that the command works but only if applied manually without the wrapper that I made.

Let me know if you have any questions

My config

{
  inputs,
  pkgs,
  unstable,
  ...
}: let
  spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
  spotifyWrapper = pkgs.makeBinaryWrapper {
    name = "spotify-wrapper";
    src = ./.;

    buildInputs = [unstable.spotify];

    installPhase = ''
      mkdir -p $out/bin
      cp $unstable.spotify/bin/spotify $out/bin/spotify
      wrapProgram "$out/bin/spotify" \
        --add-flags '--enable-wayland-ime'
    '';
  };
in {
  # import the flake's module for your system
  imports = [inputs.spicetify-nix.nixosModules.default];

  # configure spicetify :)
  programs.spicetify = {
    theme = spicePkgs.themes.Ziro;
    colorScheme = "green-dark";

    # use spotify from the nixpkgs master branch
    spotifyPackage = spotifyWrapper;
    spicetifyPackage = unstable.spicetify-cli;

    # actually enable the installation of spotify and spicetify
    enable = true;

    enabledExtensions = with spicePkgs.extensions; [
      volumePercentage
    ];

    enabledCustomApps = with spicePkgs.apps; [
      new-releases
      lyrics-plus
    ];
  };
}

Desktop (please complete the following information):

  • OS/distro: NixOS 23.11
  • Desktop environment/window manager: Hyprland
  • nixpkgs version for my home configuration: 23.11
  • nixpkgs version for my import of spicetify nix: unstable

`check_spicetify_upgrade` renamed to `check_spicetify_update`

Describe the bug

The option check_spicetify_upgrade was renamed to check_spicetify_update in the PR spicetify/spicetify-cli#2638

My config
-

Screenshots
-

Desktop (please complete the following information):

  • OS/distro: NixOS
  • Desktop environment/window manager: Hyprland
  • nixpkgs version for my home configuration: unstable
  • nixpkgs version for my import of spicetify nix: same as above

Additional context
-

Missing Config Options

Describe the bug
The config options for inject_theme_js (added in spicetify/spicetify-cli#2256) and home_config aren't available.

My config
N/A (and it's not public yet)

Screenshots
N/A

Desktop (please complete the following information):

  • OS/distro: NixOS
  • Desktop environment/window manager: Hyprland
  • nixpkgs version for my home configuration: unstable
  • nixpkgs version for my import of spicetify nix: unstable

Additional context
Found while looking through helpConfig in spicetify.go

infinite recursion encountered

I am hitting the error infinite recursion encountered when trying to install for the first time. It occurs when

spicetify-nix.homeManagerModule

is imported.

(Thank you for putting in all of the effort to make this πŸ‘ )

My flake.nix looks lke this

{
  description = "My system conf";
  inputs = rec {
    # set the channel
    nixpkgs.url = "nixpkgs/nixos-unstable";
    # enable home-manager
    home-manager.url = "github:nix-community/home-manager/master";
    # tell home manager to use the nixpkgs channel set above.
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    # master channel
    nixmaster.url = "github:NixOS/nixpkgs";
    neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
    eww.url = "github:elkowar/eww";
    nix-doom-emacs.url = "github:vlaci/nix-doom-emacs";
    spicetify-nix = { 
      url = "github:the-argus/spicetify-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # custom package
    wizardwatch_utils = {
      url = "path:/etc/nixos/packages/wizardwatch_utils";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    xtodoc = {
      url = "github:wizardwatch/xtodoc";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nixos-generators = {
      url = "github:nix-community/nixos-generators";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    flake-utils.url = "github:numtide/flake-utils";
    nix-alien = {
      url = "github:thiagokokada/nix-alien";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nix-ld = {
      url = "github:Mic92/nix-ld/main";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs =
    { self
    , nixpkgs
    , home-manager
    , neovim-nightly
    , nixmaster
    , eww
    , nix-doom-emacs
    , wizardwatch_utils
    , xtodoc
    , nixos-generators
    , flake-utils
    , nix-alien
    , spicetify-nix
    , ...
    }@inputs:
    let
      system = "x86_64-linux";
      username = "wyatt";
      pkgs = import nixpkgs {
        # imports the system variable
        inherit system;
        # enable non free packages
        config = {
          allowUnfree = true;
        };
      };
      overlays = {
        nixmaster = final: prev: {
          nixmaster = (import nixmaster {
            inherit system;
            config = {
              allowUnfree = true;
            };
          });
        };
      };
      overrides = self: super: rec {
          minecraft-bedrock-appimage = super.appimageTools.wrapType2 {
            name = "minecraft-bedrock";
            src = super.fetchurl {
              url = "https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/v0.3.4-688/Minecraft_Bedrock_Launcher-x86_64-v0.3.4.688.AppImage";
              sha256 = "sha256-TP76SypSk9JIOPnSGzpYmp+g40RE4pCuBmAapL7vqzY=";
            };
            extraPkgs = pkgs: with super; [ libpulseaudio alsa-lib alsa-utils zlib ];
          };
      };
      # install helper functions
      lib = nixpkgs.lib;
    in
    {
      homeManagerConfigurations = {
        wyatt = home-manager.lib.homeManagerConfiguration {
          inherit pkgs;
          modules = [
            ./users/wyatt/dotfiles/home.nix
            {
              nixpkgs = {
                #config.allowUnfreePredicate = (pkg: true);
                overlays = [ neovim-nightly.overlay ];
              };
              home = {
                username = "wyatt";
                homeDirectory = "/home/wyatt/.config";
                stateVersion = "20.09";
              };
            }
          ];
        };
      };
      nixosConfigurations = {
        wizardwatch = lib.makeOverridable lib.nixosSystem {
          # imports the system variable
          inherit system;
          # Taken from nix alien github
          specialArgs = { inherit self; };
          # import the config file
          modules = [
            { _module.args = inputs; }
            { nixpkgs.overlays = [ overlays.nixmaster (import ./overlays) overrides]; }
            (./common/common.nix)
            (./machines/wizardwatch/main.nix)
          ];
        };
        pc1 = lib.makeOverridable lib.nixosSystem {
          # imports the system variable
          inherit system;
          # import the config file
          modules = [
            { _module.args = inputs; }
            {
              nixpkgs.overlays = [
                overlays.nixmaster
                (import ./overlays)
              ];
            }
            (./common/common.nix)
            (./machines/pc1/main.nix)
          ];
        };
      };
      installer = nixos-generators.nixosGenerate {
        pkgs = nixpkgs.legacyPackages.x86_64-linux;
        modules = [
          { _module.args = inputs; }
          {
            nixpkgs.overlays = [
              overlays.nixmaster
              (import ./overlays)
            ];
          }
          ./machines/installer/main.nix
        ];
        format = "iso";
      };

    };
}

My home.nix looks like this

{ pkgs, unstable, spicetify-nix, lib, ... }: {
  fonts.fontconfig = {
    enable = true;
  };
  services.mpd = {
    enable = false;
    package = pkgs.mpd;
    dataDir = "/home/wyatt/.config/mpd";
    musicDirectory = "/home/wyatt/Music";
    extraConfig = ''
                      audio_output {
                        type "pulse"
                        name "fakepipe"
                      }
                      audio_output {
                        type    "fifo"
                        name    "my_fifo"
                        path    "/tmp/mpd.fifo"
                        format  "44100:16:2"
      }
    '';
  };
  gtk = {
    enable = true;
    font.name = "Iosevka";
    font.size = 14;
    theme.package = pkgs.dracula-theme;
    theme.name = "Dracula";
  };
  home.file = {
    river = {
      source = ./wayland/init;
      target = "./.config/river/init";
    };
    eww = {
      source = ./other/eww;
      recursive = true;
      target = "./.config/eww/";
    };
  };
  imports = [
    #./textEditors/neovim.nix
    #./textEditors/emacs/main.nix
    #./wayland/main.nix
    #./x/main.nix
    #./other/ncmpcpp.nix
    #./other/starship.nix
    #./spotify_plus.nix
    spicetify-nix.homeManagerModule
  ];

  # import the flake's module for your system

  # configure spicetify :)
    programs = {
      #spicetify = {
        #enable = true;
      #};
      foot = {
        enable = true;
        settings = {
          main = {
            term = "xterm-256color";
            font = "Iosevka:size=14";
            dpi-aware = "yes";
          };
          mouse = {
            hide-when-typing = "yes";
          };
          colors = {
            background = "0x282a36";
        };
      };
    };
  };
}

error: infinite recursion encountered

Hey!

I'm getting the following while trying to activate spicetify-nix:

❯ sudo nixos-rebuild switch -L
warning: updating lock file '/etc/nixos/flake.lock':
β€’ Added input 'spicetify-nix':
    'github:the-argus/spicetify-nix/ec85c2a2f5d1035142b8e383cc77b68bb0b9ebc8' (2023-02-07)
β€’ Added input 'spicetify-nix/nixpkgs':
    'github:NixOS/nixpkgs/914ef51ffa88d9b386c71bdc88bffc5273c08ada' (2022-06-12)
building the system configuration...
error: infinite recursion encountered

       at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:483:28:

          482|         builtins.addErrorContext (context name)
          483|           (args.${name} or config._module.args.${name})
             |                            ^
          484|       ) (lib.functionArgs f);
(use '--show-trace' to show detailed location information)

My spicetify-nix config can be found here. It also includes my system configuration.

The trace:

Click me

❯ sudo nixos-rebuild switch -L --impure --show-trace
building the system configuration...
error:
… while evaluating call site

   at Β«noneΒ»:0: (source not available)

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/attrsets.nix:716:24:

      715|     let f = attrPath:
      716|       zipAttrsWith (n: values:
         |                        ^
      717|         let here = attrPath ++ [n]; in

   … while evaluating call site

   at Β«noneΒ»:0: (source not available)

   … while calling 'g'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/attrsets.nix:535:19:

      534|           g =
      535|             name: value:
         |                   ^
      536|             if isAttrs value && cond value

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/attrsets.nix:538:20:

      537|               then recurse (path ++ [name]) value
      538|               else f (path ++ [name]) value;
         |                    ^
      539|         in mapAttrs g;

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:270:72:

      269|           # For definitions that have an associated option
      270|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
         |                                                                        ^
      271|

   … while evaluating the attribute 'value'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:728:9:

      727|     in warnDeprecation opt //
      728|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
         |         ^
      729|         inherit (res.defsFinal') highestPrio;

   … while evaluating the option `system.build.toplevel':

   … while evaluating the attribute 'mergedValue'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:763:5:

      762|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
      763|     mergedValue =
         |     ^
      764|       if isDefined then

   … while evaluating the attribute 'values'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:757:9:

      756|       in {
      757|         values = defs''';
         |         ^
      758|         inherit (defs'') highestPrio;

   … while evaluating the attribute 'values'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:856:7:

      855|     in {
      856|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
         |       ^
      857|       inherit highestPrio;

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:743:17:

      742|         # Process mkMerge and mkIf properties.
      743|         defs' = concatMap (m:
         |                 ^
      744|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:743:28:

      742|         # Process mkMerge and mkIf properties.
      743|         defs' = concatMap (m:
         |                            ^
      744|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

   … while evaluating definitions from `/nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/nixos/modules/system/activation/top-level.nix':

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:744:137:

      743|         defs' = concatMap (m:
      744|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
         |                                                                                                                                         ^
      745|         ) defs;

   … while calling 'dischargeProperties'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:815:25:

      814|   */
      815|   dischargeProperties = def:
         |                         ^
      816|     if def._type or "" == "merge" then

   … while evaluating the attribute 'value'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:568:44:

      567|       defnsByName' = byName "config" (module: value:
      568|           [{ inherit (module) file; inherit value; }]
         |                                            ^
      569|         ) configs;

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/nixos/modules/system/activation/top-level.nix:129:12:

      128|   # Replace runtime dependencies
      129|   system = foldr ({ oldDependency, newDependency }: drv:
         |            ^
      130|       pkgs.replaceDependency { inherit oldDependency newDependency drv; }

   … while calling 'foldr'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:53:20:

       52|   */
       53|   foldr = op: nul: list:
         |                    ^
       54|     let

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:60:8:

       59|         else op (elemAt list n) (fold' (n + 1));
       60|     in fold' 0;
         |        ^
       61|

   … while calling 'fold''

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:56:15:

       55|       len = length list;
       56|       fold' = n:
         |               ^
       57|         if n == len

   … while evaluating call site

   at Β«noneΒ»:0: (source not available)

   … while calling 'g'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/attrsets.nix:535:19:

      534|           g =
      535|             name: value:
         |                   ^
      536|             if isAttrs value && cond value

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/attrsets.nix:538:20:

      537|               then recurse (path ++ [name]) value
      538|               else f (path ++ [name]) value;
         |                    ^
      539|         in mapAttrs g;

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:270:72:

      269|           # For definitions that have an associated option
      270|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
         |                                                                        ^
      271|

   … while evaluating the attribute 'value'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:728:9:

      727|     in warnDeprecation opt //
      728|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
         |         ^
      729|         inherit (res.defsFinal') highestPrio;

   … while evaluating the option `assertions':

   … while evaluating the attribute 'mergedValue'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:763:5:

      762|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
      763|     mergedValue =
         |     ^
      764|       if isDefined then

   … while evaluating the attribute 'values'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:757:9:

      756|       in {
      757|         values = defs''';
         |         ^
      758|         inherit (defs'') highestPrio;

   … while evaluating the attribute 'values'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:856:7:

      855|     in {
      856|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
         |       ^
      857|       inherit highestPrio;

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:743:17:

      742|         # Process mkMerge and mkIf properties.
      743|         defs' = concatMap (m:
         |                 ^
      744|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:743:28:

      742|         # Process mkMerge and mkIf properties.
      743|         defs' = concatMap (m:
         |                            ^
      744|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

   … while evaluating definitions from `/nix/store/m0vk4rgrh9b0mn566330flhb94xfiqdx-source/nixos/common.nix':

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:744:137:

      743|         defs' = concatMap (m:
      744|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
         |                                                                                                                                         ^
      745|         ) defs;

   … while calling 'dischargeProperties'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:815:25:

      814|   */
      815|   dischargeProperties = def:
         |                         ^
      816|     if def._type or "" == "merge" then

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:821:11:

      820|         if def.condition then
      821|           dischargeProperties def.content
         |           ^
      822|         else

   … while calling 'dischargeProperties'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:815:25:

      814|   */
      815|   dischargeProperties = def:
         |                         ^
      816|     if def._type or "" == "merge" then

   … while evaluating the attribute 'content'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:886:14:

      885|     { _type = "if";
      886|       inherit condition content;
         |              ^
      887|     };

   … while evaluating call site

   at /nix/store/m0vk4rgrh9b0mn566330flhb94xfiqdx-source/nixos/common.nix:103:18:

      102|
      103|     assertions = flatten (flip mapAttrsToList cfg.users (user: config:
         |                  ^
      104|       flip map config.assertions (assertion: {

   … while calling 'flatten'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:138:13:

      137|   */
      138|   flatten = x:
         |             ^
      139|     if isList x

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:140:10:

      139|     if isList x
      140|     then concatMap (y: flatten y) x
         |          ^
      141|     else [x];

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:140:21:

      139|     if isList x
      140|     then concatMap (y: flatten y) x
         |                     ^
      141|     else [x];

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:140:24:

      139|     if isList x
      140|     then concatMap (y: flatten y) x
         |                        ^
      141|     else [x];

   … while calling 'flatten'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:138:13:

      137|   */
      138|   flatten = x:
         |             ^
      139|     if isList x

   … while evaluating call site

   at Β«noneΒ»:0: (source not available)

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/attrsets.nix:479:10:

      478|     attrs:
      479|     map (name: f name attrs.${name}) (attrNames attrs);
         |          ^
      480|

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/attrsets.nix:479:16:

      478|     attrs:
      479|     map (name: f name attrs.${name}) (attrNames attrs);
         |                ^
      480|

   … while calling anonymous lambda

   at /nix/store/m0vk4rgrh9b0mn566330flhb94xfiqdx-source/nixos/common.nix:103:64:

      102|
      103|     assertions = flatten (flip mapAttrsToList cfg.users (user: config:
         |                                                                ^
      104|       flip map config.assertions (assertion: {

   … while evaluating call site

   at /nix/store/m0vk4rgrh9b0mn566330flhb94xfiqdx-source/nixos/common.nix:104:7:

      103|     assertions = flatten (flip mapAttrsToList cfg.users (user: config:
      104|       flip map config.assertions (assertion: {
         |       ^
      105|         inherit (assertion) assertion;

   … while calling 'flip'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/trivial.nix:138:16:

      137|   */
      138|   flip = f: a: b: f b a;
         |                ^
      139|

   … while evaluating call site

   at Β«noneΒ»:0: (source not available)

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/types.nix:522:22:

      521|       merge = loc: defs:
      522|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
         |                      ^
      523|             (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue

   … while evaluating the attribute 'value'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:776:27:

      775|     optionalValue =
      776|       if isDefined then { value = mergedValue; }
         |                           ^
      777|       else {};

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:765:59:

      764|       if isDefined then
      765|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
         |                                                           ^
      766|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

   … while calling 'merge'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/types.nix:742:22:

      741|         check = x: isAttrs x || isFunction x || path.check x;
      742|         merge = loc: defs:
         |                      ^
      743|           (base.extendModules {

   … while evaluating the attribute 'config'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:346:9:

      345|         options = checked options;
      346|         config = checked (removeAttrs config [ "_module" ]);
         |         ^
      347|         _module = checked (config._module);

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:270:28:

      269|           # For definitions that have an associated option
      270|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
         |                            ^
      271|

   … while calling 'mapAttrsRecursiveCond'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/attrsets.nix:530:5:

      529|     # Attribute set to recursively map over.
      530|     set:
         |     ^
      531|     let

   … while evaluating the attribute 'matchedOptions'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:637:14:

      636|     in {
      637|       inherit matchedOptions;
         |              ^
      638|

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:559:21:

      558|       # an attrset 'name' => list of submodules that declare β€˜name’.
      559|       declsByName = byName "options" (module: option:
         |                     ^
      560|           [{ inherit (module) _file; options = option; }]

   … while calling 'byName'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:542:25:

      541|       */
      542|       byName = attr: f: modules:
         |                         ^
      543|         zipAttrsWith (n: concatLists)

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:262:33:

      261|           ({ inherit lib options config specialArgs; } // specialArgs);
      262|         in mergeModules prefix (reverseList collected);
         |                                 ^
      263|

   … while calling 'reverseList'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/lists.nix:406:17:

      405|   */
      406|   reverseList = xs:
         |                 ^
      407|     let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:258:25:

      257|       merged =
      258|         let collected = collectModules
         |                         ^
      259|           (specialArgs.modulesPath or "")

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:425:37:

      424|
      425|     in modulesPath: initialModules: args:
         |                                     ^
      426|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:426:7:

      425|     in modulesPath: initialModules: args:
      426|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
         |       ^
      427|

   … while calling 'filterModules'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:413:36:

      412|       # modules recursively. It returns the final list of unique-by-key modules
      413|       filterModules = modulesPath: { disabled, modules }:
         |                                    ^
      414|         let

   … while evaluating call site

   at Β«noneΒ»:0: (source not available)

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:419:31:

      418|           disabledKeys = map moduleKey disabled;
      419|           keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
         |                               ^
      420|         in map (attrs: attrs.module) (builtins.genericClosure {

   … while evaluating the attribute 'disabled'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:395:13:

      394|           collectResults = modules: {
      395|             disabled = concatLists (catAttrs "disabled" modules);
         |             ^
      396|             inherit modules;

   … while evaluating the attribute 'disabled'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:395:13:

      394|           collectResults = modules: {
      395|             disabled = concatLists (catAttrs "disabled" modules);
         |             ^
      396|             inherit modules;

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:400:22:

      399|           let
      400|             module = loadModule args parentFile "${parentKey}:anon-${toString n}" x;
         |                      ^
      401|             collectedImports = collectStructuredModules module._file module.key module.imports args;

   … while calling 'loadModule'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:359:53:

      358|       # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
      359|       loadModule = args: fallbackFile: fallbackKey: m:
         |                                                     ^
      360|         if isFunction m || isAttrs m then

   … while evaluating call site

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:360:12:

      359|       loadModule = args: fallbackFile: fallbackKey: m:
      360|         if isFunction m || isAttrs m then
         |            ^
      361|           unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgsIfFunction fallbackKey m args)

   … while calling 'isFunction'

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/trivial.nix:448:16:

      447|   */
      448|   isFunction = f: builtins.isFunction f ||
         |                ^
      449|     (f ? __functor && isFunction (f.__functor f));

   … while evaluating call site

   at Β«noneΒ»:0: (source not available)

   … while calling anonymous lambda

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:481:44:

      480|       context = name: ''while evaluating the module argument `${name}' in "${key}":'';
      481|       extraArgs = builtins.mapAttrs (name: _:
         |                                            ^
      482|         builtins.addErrorContext (context name)

   … while evaluating the module argument `spicetify-nix' in ":anon-6:anon-1":

   error: infinite recursion encountered

   at /nix/store/qilsyakhi0qmjq9iwxn49g3qbl1rp5m7-source/lib/modules.nix:483:28:

      482|         builtins.addErrorContext (context name)
      483|           (args.${name} or config._module.args.${name})
         |                            ^
      484|       ) (lib.functionArgs f);

Themes with rendering issues

The following themes are currently broken with scaling/stretching issues (at a glance, from running all the tests and just looking at the homepage and one playlist):

  • Flow
  • Omni
  • Fluent (more minor issues with the left panel being small and using squashed text instead of icons. the main panel is still usable)

Additionally, the following themes do not appear to apply at all:

  • Glaze
  • Bloom
  • Turntable (full app display just appears normal. I think the theme isn't applying.)

Haven't looked into it. The first step is to make a non-nix spicetify installation and confirm that this issue is unique to nix.

Incorrect trace warnings

Describe the bug
Minimal configuration outputs trace: warning: spicetify-nix.lib is deprecated, use spicetify-nix.libs.${pkgs.system} when evaluating, even though spicetify-nix.lib is not referenced.

My config
https://github.com/gekoke/dotfiles/blob/0d8af775ff9dc14673051b346de0b1a13bf27bcb/modules/nixos/programs/spotify/default.nix

Screenshots
image

Desktop (please complete the following information):

  • OS/distro: NixOS 24.05
  • Desktop environment/window manager: Hyprland
  • nixpkgs version for my home configuration: unstable
  • nixpkgs version for my import of spicetify nix: unstable

Either the trace warning is incorrect, or the docs should provide an updated usage example.

Thanks for providing this module!

Comfy theme build error on newest commit

Hello again :) Thanks for the latest update! I'm now facing an issue while building spicetify-nix with the Comfy theme:

spotify> cp: cannot stat '/nix/store/0ai12a71512xcxprkrpp3za3z06qhzil-Spicetify-9ee342a/Comfy/comfy.js': No such file or directory
spotify> cat: ./Themes/Comfy/comfy.script.js: No such file or directory

Had a look at the given directory, here it seems to be theme.js that needs to be installed instead:

πŸ”127 ❯ ls /nix/store/0ai12a71512xcxprkrpp3za3z06qhzil-Spicetify-9ee342a/Comfy/
app.css   assets     package.json  README.md  theme.js         user.css
app.scss  color.ini  preview       snippets   theme.script.js

My home-manager module:

{ pkgs, ... }:
let
  # This was for some reason needed to get it working and I don't know why
  flake-compat = builtins.fetchTarball {
    url = "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
    sha256 = "1prd9b1xx8c0sfwnyzkspplh30m613j42l1k789s521f4kv4c2z2";
  };
  spicetify-nix =
    (import flake-compat {
      src = builtins.fetchTarball {
        url = "https://github.com/the-argus/spicetify-nix/archive/master.zip";
        sha256 = "sha256:151pmil25z0gxdsax34klkzp16capv62d7226qc43y44689frchv";
      };
    }).defaultNix;
  spicePkgs = spicetify-nix.packages.${pkgs.system}.default;
in
{
  # Import the spicetify-cli home-manager module
  imports = [
    spicetify-nix.homeManagerModule
  ];

  # Fancy Gruvbox themed, enhanced Spotify
  programs.spicetify = {
    enable = true;
    #theme = spicePkgs.themes.Comfy;
    enabledExtensions = with spicePkgs.extensions; [
      autoSkipVideo
      fullAlbumDate
      genre
      groupSession
      hidePodcasts
      history
      popupLyrics
      seekSong
    ];
    injectCss = true;
    replaceColors = true;
    overwriteAssets = true;
    sidebarConfig = true;
    enabledCustomApps = with spicePkgs.apps; [
      lyrics-plus
      new-releases
    ];
  };
}

marketplace: Something went wrong

After recent update f89305a...c1abe3d, I see the following when building spotify:

spotify> Transferring custom apps:
spotify> error Custom app "marketplace" does not have index.js

The Marketplace is still in the menu but clicking it shows β€œSomething went wrong” page.

I am using the following in my home-manager config:

    programs.spicetify = {
      enable = true;
      theme = pkgs.spicePkgs.themes.Default;

      enabledCustomApps = with pkgs.spicePkgs.apps; [
        lyrics-plus
        marketplace
      ];

      enabledExtensions = with pkgs.spicePkgs.extensions; [
        playNext
        hidePodcasts
      ];
    };

Specify that spotify is included

I am not sure if it's just a me problem, but at first I was certain that I needed to install the Spotify package as well, thinking this was similar to the cli tool, which obviously lead to collision issues. Fixing it is really simple, and might help others.

Expose an option to enable devtools

Spicetify CLI has an spicetify enable-devtools action that enables chromium devtools, seemingly by patching .cache/spotify/offline.bnk, which is helpful when developing themes and CSS snippets. I'm not sure if just conditionally appending it to this line would be a good idea, or if there's a better way to do it, but I think it would be useful to have.

Spicetify not connecting to MPRIS

Describe the bug
When using Spicetify, opening Spotify as the first music player after booting the system, it does not appear in the MPRIS clients list. It may show up if you open a YouTube video then close it, or it may not.

The non-Spicetify version starts as a MPRIS client always, so it's not a Spotify issue.

My config
[Provide a link to your nix configuration. Alternatively, provide a nix run or nix build command which will replicate the issue.](https://github.com/fufexan/dotfiles/blob/ec598124085fac0dbdbe5b3cf733e8c66860da74/home/programs/spicetify.nix)

Screenshots
Not needed.

Desktop (please complete the following information):

  • OS/distro: NixOS
  • Desktop environment/window manager: Hyprland
  • nixpkgs version for my home configuration: unstable ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
  • nixpkgs version for my import of spicetify nix: same as above

Additional context
Add any other context about the problem here.

Add pywal theme.

I like to use pywal. But i couldn't able to find any way to use pywal theme on spicefity-nix.

Using it as a home manager module without flakes

This seems like it's only really meant for flakes. I don't currently plan on using flakes any time soon so I was curious if there is an obvious way to just allow it to be an imported module? I am not very familiar with the Nix language so I am unsure how to do this myself.

Dribblish rendering issue

Hello, this is how Dribblish render with the latest Spotify.
28-07-2023-09:54:11
Does anyone know which CSS I can use to fix it ? Thank you !

Could not resolve host: github.com

Describe the bug
Upon fetching the repo, git states it cannot resolve the host.

My config

error: builder for '/nix/store/5j7jixmsgxn2c3hmg3ypjrlvv3rrgdz5-spicetify-cli-fea4245.drv' failed with exit code 1;
       last 6 log lines:
       > exporting https://github.com/spicetify/spicetify-cli (rev fea4245cd61c3c7df8de48d1b9d965cf97327694) into /nix/store/z0jy62dbx9sysgbwjkal2jv2nfz4qwff-spicetify-cli-fea4245
       > Initialized empty Git repository in /nix/store/z0jy62dbx9sysgbwjkal2jv2nfz4qwff-spicetify-cli-fea4245/.git/
       > fatal: unable to access 'https://github.com/spicetify/spicetify-cli/': Could not resolve host: github.com
       > fatal: unable to access 'https://github.com/spicetify/spicetify-cli/': Could not resolve host: github.com
       > fatal: unable to access 'https://github.com/spicetify/spicetify-cli/': Could not resolve host: github.com
       > Unable to checkout fea4245cd61c3c7df8de48d1b9d965cf97327694 from https://github.com/spicetify/spicetify-cli.
       For full logs, run 'nix log /nix/store/5j7jixmsgxn2c3hmg3ypjrlvv3rrgdz5-spicetify-cli-fea4245.drv'.
error: 1 dependencies of derivation '/nix/store/idbib1mcs8cwi5jq71gqygf103423zml-spicetify-catppuccin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1a412hysshv6vhg28x01w9nfdkml6bk2-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l32nnlzgnlkf1ap051760gw2iln084q5-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/jrlxwgsc1mzij16p0vvzhgfasskgrzmv-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/n4q8r0fm7368xw2rkls0v44l408a6f9y-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8hyl35iafz9lbdhjg007j4s1gbngv7ya-nixos-system-user-24.05.20240416.5672bc9.drv' failed to build

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS/distro: Nix OS
  • Desktop environment/window manager: Hyprland
  • nixpkgs version for my home configuration: (22.11, 23.05, unstable, etc) 24.05.20240416.5672bc9 (Uakari)
  • nixpkgs version for my import of spicetify nix: (22.11, 23.05, unstable, etc, or "same as above") same as above

Additional context
Add any other context about the problem here.

I found a similar issue here if it helps:
https://discourse.nixos.org/t/flakes-git-cannot-resolve-host-when-running-during-build/18175/6

Thanks so much

experimental_features option not respected

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.

experimental_features = needExperimental;

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

NixOS: Cannot install - infinite recursion

In my home-manager on NixOS, I added the flake input and activated the program just as the readme suggested. When building the new home-manager generation, it will fail with

error: infinite recursion encountered

       at /nix/store/j3cnzmjq5b3naz1nckh6p39fnkaabv5d-source/lib/modules.nix:506:28:

          505|         builtins.addErrorContext (context name)
          506|           (args.${name} or config._module.args.${name})
             |                            ^
          507|       ) (lib.functionArgs f);

I disabled all optional extensions, so it must be something within the core module.

Home manager `flake.nix`

{
  description = "Home Manager configuration";

  inputs = {
    spicetify-nix.url = "github:the-argus/spicetify-nix";
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.nixos.follows = "nixos";
    };
  };

  outputs = { nixpkgs, emacs-overlay, home-manager, ... }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in {
      homeConfigurations."hermann" = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;
        modules = [ ./home.nix ];
      };
    };
}

My home.nix imports spicetify.nix

spicetify.nix

{ spicetify-nix, config, lib, pkgs, ... }:

let spicePkgs = spicetify-nix.packages.${pkgs.system}.default;
in {
  # allow spotify to be installed if you don't have unfree enabled already
  nixpkgs.config.allowUnfreePredicate = pkg:
    builtins.elem (lib.getName pkg) [ "spotify" ];

  # import the flake's module for your system
  imports = [ spicetify-nix.homeManagerModule ];

  # configure spicetify :)
  programs.spicetify = {
    enable = true;
    theme = spicePkgs.themes.catppuccin-mocha;
    colorScheme = "flamingo";

    enabledExtensions = with spicePkgs.extensions; [
      ...
    ];
  };
}

Catppuccin theme is not consistent

In newer versions of Spotify (I'm on 1.2.8.923.g4f94bf0d), the Catppuccin theme has "greyed out" colors for some of the text and icons, mostly visible in the friends tab and on the song controls.
image

error: infinite recursion encountered

I am getting this error when configuring spicetify that says ```

error: infinite recursion encountered

  at /nix/store/56cpcqclkgjwv2922xn4v1chisr8wz9m-source/lib/modules.nix:469:28:

      468|         builtins.addErrorContext (context name)
      469|           (args.${name} or config._module.args.${name})
         |                            ^
      470|       ) (lib.functionArgs f);
(use '--show-trace' to show detailed location information)

My flake.nix config:

{
  description = "A very basic flake";
  
  inputs = {
  nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  nur.url = "github:nix-community/NUR";
  spicetify-nix = {
      url = github:jakeisnt/spicetify-nix;
      inputs.nixpkgs.follows = "nixpkgs";
    };
  home-manager = {
    url = github:nix-community/home-manager;
    inputs.nixpkgs.follows = "nixpkgs";
  };
 };

  outputs = inputs @ { self, nixpkgs, home-manager, nur, spicetify-nix }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs {
              inherit system;
              config.allowUnfree = true;
      };

      lib = nixpkgs.lib;
    in {
      nixosConfigurations = {
        nixos = lib.nixosSystem {
               inherit system;
               modules = [ 
               ./configuration.nix
               nur.nixosModules.nur
               home-manager.nixosModules.home-manager {
               home-manager.useGlobalPkgs = true;
               home-manager.useUserPackages = true;
               home-manager.users.joshuaelm = {
                  config = {
                    _module.args.inputs = inputs;
                  };
                  imports = [
                     ./home.nix
                     ./nvim
                     ./spicetify.nix
                   ];
                 };
             }
         ];
        };
      };
    };

My home.nix config:


{
  # Home Manager needs a bit of information about you and the
  # paths it should manage.
  home.username = "joshuaelm";
  home.homeDirectory = "/home/joshuaelm";

  # This value determines the Home Manager release that your
  # configuration is compatible with. This helps avoid breakage
  # when a new Home Manager release introduces backwards
  # incompatible changes.
  #
  # You can update Home Manager without changing this value. See
  # the Home Manager release notes for a list of state version
  # changes in each release.

  home.stateVersion = "22.05";

  programs.firefox = {
    enable = true;
    extensions = with pkgs.nur.repos.rycee.firefox-addons; [
        bitwarden
    ];
};
  # Starship
  programs.starship = {
    enable = true;
  };
  home.file."gtk4-css" = {
        target = ".config/gtk-4.0/gtk.css";
        source = (builtins.fetchurl {url = "http://192.168.11.232/WryOpussum/gtk-catppuccin-colors/-/raw/main/gtk.css"; sha256 = "00jla5q1zd1bw1sr5ss81gflffnf07y3vyy9y9pinlls7xrn9fnx";});
      };
  home.file."gtk3-css" = {
        target = ".config/gtk-3.0/gtk.css";
        source = (builtins.fetchurl {url = "http://192.168.11.232/WryOpussum/gtk-catppuccin-colors/-/raw/main/gtk.css"; sha256 = "00jla5q1zd1bw1sr5ss81gflffnf07y3vyy9y9pinlls7xrn9fnx";});
  };
  home.file."kitty-conf" = {
      target = ".config/kitty/kitty.conf";
      source = (builtins.fetchurl {url = "http://192.168.11.232/WryOpussum/kitty-config/-/raw/main/kitty.conf"; sha256 = "0zimi9n8hpzn99cprkiy7dsvgaikzj4crcrd7sr091dyc08kp29n";});
    };
  home.file."element-css" = {
      target = ".config/Element/config.json";
      source = (builtins.fetchurl {url = "https://raw.githubusercontent.com/catppuccin/element/main/config.json"; sha256 = "13b6mnblfc7r6ylfvxn9jfmbhvhi2y9qprh352jj5146nvg7abgp";});
  };
  home.packages = with pkgs; [ cava signal-desktop brave rnix-lsp nixfmt ];
  programs.fish.enable = true;

My spicetify.nix:

{ pkgs, unstable, lib, spicetify-nix, ... }:
{
  # allow spotify to be installed if you don't have unfree enabled already
  nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
    "spotify-unwrapped"
  ];

  # import the flake's module for your system
  imports = [ spicetify-nix.homeManagerModule ];

  # configure spicetify :)
  programs.spicetify =
    {
      enable = true;
      theme = "catppuccin-mocha";
      # OR 
      # theme = spicetify-nix.pkgSets.${pkgs.system}.themes.catppuccin-mocha;
      colorScheme = "flamingo";

      enabledExtensions = [
        "fullAppDisplay.js"
        "shuffle+.js"
        "hidePodcasts.js"
      ];
    };
}

Catppuccin color change

I just updated to the newer version where now the package is just called catppuccin without the flavour and the color Scheme value is now the flavour how to set the accent?

`nix flake show`/`check` fails

Describe the bug

Running nix flake show fails:

$ nix flake show github:the-argus/spicetify-nix
github:the-argus/spicetify-nix/3c702af1f717b7876fac08809201b1368d0d956c
β”œβ”€β”€β”€checks
β”‚   β”œβ”€β”€β”€aarch64-linux
β”‚   β”‚   β”œβ”€β”€β”€all-exts-and-apps omitted (use '--all-systems' to show)
β”‚   β”‚   β”œβ”€β”€β”€all-for-theme omitted (use '--all-systems' to show)
β”‚   β”‚   β”œβ”€β”€β”€all-tests omitted (use '--all-systems' to show)
β”‚   β”‚   β”œβ”€β”€β”€apps omitted (use '--all-systems' to show)
β”‚   β”‚   β”œβ”€β”€β”€default omitted (use '--all-systems' to show)
β”‚   β”‚   └───minimal-config omitted (use '--all-systems' to show)
β”‚   └───x86_64-linux
error: expected a derivation

As does nix flake check:

$ nix flake check --impure github:the-argus/spicetify-nix
warning: unknown flake output 'homeManagerModules'
warning: unknown flake output 'homeManagerModule'
warning: flake output attribute 'nixosModule' is deprecated; use 'nixosModules.default' instead
trace: warning: spicetify-nix.lib is deprecated, use spicetify-nix.libs.${pkgs.system}
trace: warning: spicetify-nix.pkgs is deprecated, use spicetify-nix.packages.${pkgs.system}
warning: unknown flake output 'pkgs'
warning: unknown flake output 'libs'
error (ignored): error:
       … while checking the derivation 'packages.x86_64-linux.spicetify'

         at /nix/store/js56338sxzdlvvwrs3j766zni3n9c4yv-source/flake.nix:70:9:

           69|       packages = {
           70|         spicetify = pkgs.callPackage ./pkgs {};
             |         ^
           71|         default = self.packages.${system}.spicetify;

       error: flake attribute 'packages.x86_64-linux.spicetify' is not a derivation
error (ignored): error:
       … while checking the derivation 'packages.x86_64-linux.default'

         at /nix/store/js56338sxzdlvvwrs3j766zni3n9c4yv-source/flake.nix:71:9:

           70|         spicetify = pkgs.callPackage ./pkgs {};
           71|         default = self.packages.${system}.spicetify;
             |         ^
           72|       };

       error: flake attribute 'packages.x86_64-linux.default' is not a derivation

My config

nix flake show github:the-argus/spicetify-nix

or

nix flake check --impure github:the-argus/spicetify-nix

Screenshots
n/a

Desktop (please complete the following information):
n/a

Additional context
Commands return errors due to various schema violations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.