nixos-configs/modules/media/mpd.nix

39 lines
1 KiB
Nix
Raw Permalink Normal View History

2024-08-20 22:58:24 +02:00
{ config, lib, ... }:
2023-03-23 19:01:42 +01:00
2024-08-20 22:58:24 +02:00
let
cfg = config.modules.media.mpd;
in
{
options.modules.media.mpd = {
enable = lib.my.mkBoolOpt false;
};
config = lib.mkIf cfg.enable {
home-manager.users.${config.user.name} =
{ config, ... }:
{
services.mpd = {
enable = true;
network.listenAddress = "any";
musicDirectory = "${config.home.homeDirectory}/Nextcloud/Media/Music";
playlistDirectory = "${config.home.homeDirectory}/Nextcloud/Playlists";
extraConfig = ''
max_output_buffer_size "16384"
auto_update "yes"
audio_output {
type "pulse"
name "pulse audio"
device "pulse"
mixer_type "hardware"
}
audio_output {
type "fifo"
name "toggle_visualizer"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
'';
};
2023-03-23 19:01:42 +01:00
};
};
}