aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/services/spotifyd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/services/spotifyd.nix')
-rw-r--r--home-manager/modules/services/spotifyd.nix18
1 files changed, 15 insertions, 3 deletions
diff --git a/home-manager/modules/services/spotifyd.nix b/home-manager/modules/services/spotifyd.nix
index bc231814eba..dfe0ecd318e 100644
--- a/home-manager/modules/services/spotifyd.nix
+++ b/home-manager/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 = { };
@@ -21,7 +33,7 @@ in {
example = literalExample ''
{
global = {
- user = "Alex";
+ username = "Alex";
password = "foo";
device_name = "nix";
};
@@ -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;
};