From 38ee6a9cb9f67ff2aae19598c1db0443dc28b1db Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Mon, 11 Nov 2024 12:25:18 +0700 Subject: [PATCH] spotify: added spotifyd support --- home/programs/spotify.nix | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/home/programs/spotify.nix b/home/programs/spotify.nix index b1e5c22..5a340d6 100644 --- a/home/programs/spotify.nix +++ b/home/programs/spotify.nix @@ -8,5 +8,33 @@ let cfg = config.profile.spotify; in { - config = lib.mkIf cfg.enable { home.packages = with pkgs; [ spotify ]; }; + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + (spotifywm.overrideAttrs { + version = "azurmeau-fork"; + src = fetchFromGitHub { + owner = "amurzeau"; + repo = "spotifywm"; + rev = "b2222c9da47b278a3addef48250513420df405ac"; + hash = "sha256-kRBOV2jPJ81xGEgCbSBcOo4Ie9FoK1kfxXMQG1vhHfM="; + }; + }) + ]; + + sops.secrets."spotifyd/password" = { + sopsFile = ../../secrets/spotify.yaml; + }; + + services.spotifyd = { + enable = true; + settings = { + global = { + use_keyring = false; + use_mpris = true; + device_type = "speaker"; + device_name = "Spotifyd"; + }; + }; + }; + }; }