mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51:34 +01:00
Switch to spotifyd
This commit is contained in:
parent
c170ec09db
commit
4d42f548fd
6 changed files with 71 additions and 4 deletions
27
modules/home/spotifyd.nix
Normal file
27
modules/home/spotifyd.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.spotifyd.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.spotifyd.enable {
|
||||
sops.secrets = {
|
||||
"spotify/username" = {};
|
||||
"spotify/password" = {};
|
||||
};
|
||||
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
|
||||
settings.global = {
|
||||
username_cmd = "cat ${config.sops.secrets."spotify/username".path}";
|
||||
password_cmd = "cat ${config.sops.secrets."spotify/password".path}";
|
||||
backend = "pulseaudio";
|
||||
device_name = "${osConfig.networking.hostName}";
|
||||
device_type = "computer";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue