diff --git a/home-manager/fred.nix b/home-manager/fred.nix index 7c644f1..df36402 100644 --- a/home-manager/fred.nix +++ b/home-manager/fred.nix @@ -57,6 +57,24 @@ in # default on Linux, so only the off-by-default visualiser needs setting. programs.spotify-player = lib.mkIf isDesktop { enable = true; + # 26.05 ships 0.23.0, whose Web API token is cached with refresh_token = + # null: once it expires (~1h) nothing can renew it and the library just + # spins until the app is restarted. 0.24.1 treats a non-renewable cached + # token as unusable and re-runs the PKCE flow instead. Drop this override + # once the pinned channel reaches 0.24.1. + package = pkgs.spotify-player.overrideAttrs (old: rec { + version = "0.24.1"; + src = pkgs.fetchFromGitHub { + owner = "aome510"; + repo = "spotify-player"; + tag = "v${version}"; + hash = "sha256-+GADmRl4XMwV8TfYZjEeyKDDfda3bDPzeerhYryX6vA="; + }; + cargoDeps = pkgs.rustPlatform.fetchCargoVendor { + inherit src; + hash = "sha256-CSZ5sZ+d7Jhi43ipaWXKupYPFgWCbCx4RMTQN8emu9o="; + }; + }); settings = { enable_audio_visualization = true; # Our own Spotify app rather than the built-in default (ncspot's client