spotifyd Stuff

This commit is contained in:
Annika Merris 2024-05-12 10:57:11 -04:00
parent 810bd854d8
commit a7f18eab61

View file

@ -45,6 +45,9 @@
# Helper stuff
pkgs.nixpkgs-fmt
# Don't know what to call this
pkgs.spotifyd
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
@ -117,16 +120,28 @@
};
};
services.spotifyd = {
enable = true;
settings = {
global = {
username = "me@annikamerris.com";
password = "R%3@TNGQYckkGopY";
use_mpris = true;
device_name = "kim-nix";
device_type = "computer";
};
# Install and setup spotifyd
sops.templates."spotifyd.conf".content = ''
[global]
username = "me@annikamerris.com"
password = "${config.sops.placeholder."spotifyd/settings/global/password"}"
use_mpris = true
device_name = "kim-nix"
device_type = "computer"
'';
systemd.user.services.spotifyd = {
Unit = {
Description = "spotify daemon";
Documentation = "https://github.com/Spotifyd/spotifyd";
};
Install.WantedBy = [ "default.target" ];
Service = {
ExecStart =
"${pkgs.spotifyd}/bin/spotifyd --no-daemon --config-path ${config.sops.templates."spotifyd.conf".path}";
Restart = "always";
RestartSec = 12;
};
};