From 8cc95767a246ec2763ae9fdf4a833d02ab182262 Mon Sep 17 00:00:00 2001 From: azrdev Date: Wed, 4 Feb 2026 21:32:51 +0100 Subject: [PATCH] nixos/spotifyd: add `package` option Spotify service changes frequently break spotifyd. Using newer releases from upstream requires overlaying the module too, even though it rarely changes package. This change should allow using newer spotifyd builds (e.g. from nixos-unstable) without having to overlay the module in the current (e.g. nixos stable) system. --- nixos/modules/services/audio/spotifyd.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/audio/spotifyd.nix b/nixos/modules/services/audio/spotifyd.nix index 2264d7c39c6b..74cc60fce0f7 100644 --- a/nixos/modules/services/audio/spotifyd.nix +++ b/nixos/modules/services/audio/spotifyd.nix @@ -23,6 +23,8 @@ in services.spotifyd = { enable = lib.mkEnableOption "spotifyd, a Spotify playing daemon"; + package = lib.mkPackageOption pkgs "spotifyd" { }; + config = lib.mkOption { default = ""; type = lib.types.lines; @@ -43,6 +45,7 @@ in . ''; }; + }; }; @@ -64,7 +67,7 @@ in description = "spotifyd, a Spotify playing daemon"; environment.SHELL = "/bin/sh"; serviceConfig = { - ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --cache-path /var/cache/spotifyd --config-path ${spotifydConf}"; + ExecStart = "${cfg.package}/bin/spotifyd --no-daemon --cache-path /var/cache/spotifyd --config-path ${spotifydConf}"; Restart = "always"; RestartSec = 12; DynamicUser = true;