From cd4bc6fde00e3da0382a3eb151dbbd0087449377 Mon Sep 17 00:00:00 2001 From: Openlab Hannswurscht Date: Thu, 16 Feb 2017 11:27:49 +0100 Subject: machines/hansswurscht: global pulse & mpd Pulse works just fine as system process by now, even with avahi zeroconf. Add mpd & an nfs music mount from the fileserver. --- machines/labnet/labtops.nix | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'machines') diff --git a/machines/labnet/labtops.nix b/machines/labnet/labtops.nix index 6ae22caa..0571476e 100644 --- a/machines/labnet/labtops.nix +++ b/machines/labnet/labtops.nix @@ -15,6 +15,7 @@ }; hannswurscht = { pkgs, ... }: + let musicDir = "/data/music"; in { vuizvui.user.openlab.base.enable = true; @@ -24,18 +25,40 @@ services.mingetty.autologinUser = "openlab"; hardware.pulseaudio = { - #package = pkgs.pulseaudioLight.overrideDerivation (old: { - # patches = old.patches or [] ++ [ ./buffer.patch ]; - #}); enable = true; - tcp.enable = true; - tcp.anonymousClients.allowedIpRanges = [ "172.16.0.0/16" ]; + systemWide = true; + package = pkgs.pulseaudioFull; + zeroconf.discovery.enable = false; zeroconf.publish.enable = true; + tcp.enable = true; + tcp.anonymousClients.allowedIpRanges = [ "172.16.0.0/16" "127.0.0.1" ]; }; - #services.shairport-sync.enable = true; vuizvui.user.openlab.stackenblocken.enable = true; services.logind.extraConfig = "HandleLidSwitch=ignore"; + + services.mpd = { + enable = true; + musicDirectory = musicDir; + network.listenAddress = "any"; + extraConfig = '' + auto_update yes + audio_output { + type "pulse" + name "MPD Pulse Output" + server "127.0.0.1" + } + ''; + }; + + fileSystems = { + "${musicDir}" = { + device = "ftp.openlab.lan:/data/upload/music"; + fsType = "nfs"; + label = "lab-ftp"; + options = [ "nolock" "x-systemd.automount"]; + }; + }; }; } -- cgit 1.4.1