mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 18:41:34 +01:00
27 lines
724 B
Nix
27 lines
724 B
Nix
{
|
|
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}";
|
|
device_name = "${osConfig.networking.hostName}";
|
|
initial_volume = "40";
|
|
volume_normalisation = true;
|
|
};
|
|
};
|
|
};
|
|
}
|