Switch to spotifyd

This commit is contained in:
SebastianStork 2024-04-27 23:05:51 +02:00
parent c170ec09db
commit 4d42f548fd
6 changed files with 71 additions and 4 deletions

View file

@ -9,5 +9,6 @@
./kitty.nix
./equalizer
./sops.nix
./spotifyd.nix
];
}

View file

@ -11,7 +11,7 @@
config = lib.mkIf config.myConfig.sops.enable {
sops = {
age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
defaultSopsFile = "${inputs.self}/home/${config.home.username}/secrets.yaml";
defaultSopsFile = "${inputs.self}/users/${config.home.username}/secrets.yaml";
};
};
}

27
modules/home/spotifyd.nix Normal file
View 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";
};
};
};
}