Add MPD to audio service module
This commit is contained in:
parent
856c4ac696
commit
14bbdea9dc
4 changed files with 36 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
enable = true;
|
||||
name = "Audio Hauptraum Küche";
|
||||
};
|
||||
services.mpd.musicDirectory = "smb://beamer:beamer@beamer.z9.ccchh.net/music";
|
||||
|
||||
users.users.chaos.extraGroups = [ "pipewire" ];
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
enable = true;
|
||||
name = "Audio Hauptraum Tafel";
|
||||
};
|
||||
services.mpd.musicDirectory = "smb://beamer:beamer@beamer.z9.ccchh.net/music";
|
||||
|
||||
users.users.chaos.extraGroups = [ "pipewire" ];
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ in
|
|||
{
|
||||
imports = [
|
||||
./librespot.nix
|
||||
./mpd.nix
|
||||
./networking.nix
|
||||
./pipewire.nix
|
||||
./shairport-sync.nix
|
||||
|
|
33
modules/services/audio/mpd.nix
Normal file
33
modules/services/audio/mpd.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Links & Resources:
|
||||
# - https://mpd.readthedocs.io/en/stable/user.html
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.ccchh.services.audio;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.listenAddress = "any";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Pipewire"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
users.users.mpd.extraGroups = [ "pipewire" ];
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 6600 ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue