inherit username/password from secrets

This commit is contained in:
Adithya 2023-08-05 18:03:52 +05:30
parent 4dbcb5dde3
commit 6dbeec423d
Signed by: adtya
GPG key ID: 48FC9915FFD326D0

View file

@ -1,18 +1,15 @@
{pkgs, ...}: { {pkgs, secrets, ...}: {
services = { services = {
spotifyd = { spotifyd = {
enable = true; enable = true;
package = pkgs.spotifyd.override { package = pkgs.spotifyd.override {
withKeyring = true;
withMpris = true; withMpris = true;
}; };
settings = { settings = {
global = { global = {
use_keyring = true; inherit (secrets.spotify) username;
inherit (secrets.spotify) password;
use_mpris = true; use_mpris = true;
username_cmd = ''
${pkgs.libsecret}/bin/secret-tool search --all service spotifyd 2>&1 | grep 'username' | awk -F'= ' '{print $2}'
'';
device_name = "Skipperd"; device_name = "Skipperd";
device_type = "computer"; device_type = "computer";
backend = "pulseaudio"; backend = "pulseaudio";