flammea: add mpd

This commit is contained in:
Gabriel Ebner 2022-11-25 20:14:38 -08:00
parent 32ec56e6e0
commit 9da7c7c9fc
1 changed files with 44 additions and 0 deletions

View File

@ -1,5 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let mpdStreamingPort = 8080; in
{ {
imports = imports =
[ [
@ -106,6 +107,8 @@
# }; # };
# networking.firewall.allowedTCPPorts = [ config.services.nix-serve.port ]; # networking.firewall.allowedTCPPorts = [ config.services.nix-serve.port ];
networking.firewall.trustedInterfaces = [ "tailscale0" ];
services.openssh.forwardX11 = true; services.openssh.forwardX11 = true;
fileSystems."/mnt/aplysia".device = pkgs.lib.mkOverride 10 "//aplysia.auroch-boa.ts.net/export"; fileSystems."/mnt/aplysia".device = pkgs.lib.mkOverride 10 "//aplysia.auroch-boa.ts.net/export";
@ -147,4 +150,45 @@
system.stateVersion = "22.11"; system.stateVersion = "22.11";
services.mpd = {
enable = true;
# network.listenAddress = "127.0.0.1";
musicDirectory = "/mnt/aplysia/music";
extraConfig = ''
bind_to_address "100.125.210.32"
# audio_output {
# type "alsa"
# name "dac"
# device "sysdefault:CARD=QAMP"
# }
audio_output {
type "pulse"
name "pulse"
server "127.0.0.1"
}
audio_output {
type "httpd"
name "http"
encoder "flac"
port "${toString mpdStreamingPort}"
}
replaygain "auto"
restore_paused "yes"
'';
};
services.pipewire = {
config.pipewire-pulse = {
"pulse.properties"."server.address" = [
"unix:native"
"tcp:127.0.0.1:4713"
# "tcp:100.97.134.100:4713"
];
};
};
} }