added stuff
This commit is contained in:
parent
e8d9044d2b
commit
9d0ebdfbd0
907 changed files with 70990 additions and 0 deletions
38
nyx/homes/notashelf/services/shared/media/spotifyd.nix
Normal file
38
nyx/homes/notashelf/services/shared/media/spotifyd.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
dev = osConfig.modules.device;
|
||||
|
||||
credientals = {
|
||||
password_cmd = "${pkgs.coreutils}/bin/tail -1 /run/agenix/spotify";
|
||||
username_cmd = "${pkgs.coreutils}/bin/head -1 /run/agenix/spotify";
|
||||
};
|
||||
|
||||
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
|
||||
in {
|
||||
config = mkIf (builtins.elem dev.type acceptedTypes) {
|
||||
services = {
|
||||
spotifyd = {
|
||||
enable = false;
|
||||
package = pkgs.spotifyd.override {withMpris = true;};
|
||||
settings.global = {
|
||||
inherit (credientals) password_cmd username_cmd;
|
||||
cache_path = "${config.xdg.cacheHome}/spotifyd";
|
||||
device_type = "computer";
|
||||
use_mpris = true;
|
||||
autoplay = true;
|
||||
|
||||
# audio settings
|
||||
volume_normalisation = true;
|
||||
backend = "pulseaudio";
|
||||
bitrate = 320;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue