mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
57 lines
1.1 KiB
Nix
Executable file
57 lines
1.1 KiB
Nix
Executable file
{
|
|
services = {
|
|
mpd = {
|
|
enable = true;
|
|
musicDirectory = "/mnt/media/ceres/storage/Music";
|
|
extraConfig = ''
|
|
audio_output {
|
|
type "pulse"
|
|
name "PulseAudio"
|
|
}
|
|
audio_output {
|
|
type "fifo"
|
|
name "my_fifo"
|
|
path "/tmp/mpd.fifo"
|
|
format "44100:16:2"
|
|
}
|
|
'';
|
|
};
|
|
mpd-discord-rpc = {
|
|
enable = true;
|
|
settings = {
|
|
format = {
|
|
hosts = [ "localhost:6600" ];
|
|
details = "$title";
|
|
state = "$artist";
|
|
display_type = "state";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.cava = {
|
|
enable = true;
|
|
settings = {
|
|
input = {
|
|
method = "fifo";
|
|
source = "/tmp/mpd.fifo";
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.user.services.mpd-discord-rpc = {
|
|
Unit = {
|
|
After = [
|
|
"mpd.service"
|
|
"graphical-session.target"
|
|
];
|
|
Requires = [ "mpd.service" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
Service = {
|
|
Restart = "on-failure";
|
|
RestartSec = "10s";
|
|
};
|
|
};
|
|
|
|
}
|