aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSergei Maximov <s.b.maximov@gmail.com>2020-07-15 15:01:01 +0300
committerRobert Helgesson <robert@rycee.net>2020-07-25 20:43:43 +0200
commit5cd7865c6cea1d56cf7b8b5ef5a01544ab6c1ab3 (patch)
tree56823b534be1e7bf92935bfa470f35429bc6f1f3 /modules
parent3f1be6935903c61065f7036f312f574585c9cfe8 (diff)
spotifyd: add `package` option
This option can be used to enable optional Spotifyd features, such as looking up the Spotify password in the system keyring or enabling MPRIS support. PR #1390
Diffstat (limited to 'modules')
-rw-r--r--modules/services/spotifyd.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/services/spotifyd.nix b/modules/services/spotifyd.nix
index 730a46e135f..dfe0ecd318e 100644
--- a/modules/services/spotifyd.nix
+++ b/modules/services/spotifyd.nix
@@ -14,6 +14,18 @@ in {
options.services.spotifyd = {
enable = mkEnableOption "SpotifyD connect";
+ package = mkOption {
+ type = types.package;
+ default = pkgs.spotifyd;
+ defaultText = literalExample "pkgs.spotifyd";
+ example =
+ literalExample "(pkgs.spotifyd.override { withKeyring = true; })";
+ description = ''
+ The <literal>spotifyd</literal> package to use.
+ Can be used to specify extensions.
+ '';
+ };
+
settings = mkOption {
type = types.attrsOf (types.attrsOf types.str);
default = { };
@@ -31,7 +43,7 @@ in {
};
config = mkIf cfg.enable {
- home.packages = [ pkgs.spotifyd ];
+ home.packages = [ cfg.package ];
systemd.user.services.spotifyd = {
Unit = {
@@ -43,7 +55,7 @@ in {
Service = {
ExecStart =
- "${pkgs.spotifyd}/bin/spotifyd --no-daemon --config-path ${configFile}";
+ "${cfg.package}/bin/spotifyd --no-daemon --config-path ${configFile}";
Restart = "always";
RestartSec = 12;
};