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.
This commit is contained in:
@@ -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
|
||||
<https://docs.spotifyd.rs/configuration/index.html#config-file>.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user