mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
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
This commit is contained in:
parent
3f1be69359
commit
5cd7865c6c
1 changed files with 14 additions and 2 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue