mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Switch to spotifyd
This commit is contained in:
parent
c170ec09db
commit
4d42f548fd
6 changed files with 71 additions and 4 deletions
|
|
@ -9,5 +9,6 @@
|
|||
./kitty.nix
|
||||
./equalizer
|
||||
./sops.nix
|
||||
./spotifyd.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
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