Browse Source

Pulsebert: configure MPD, enable YMPD web UI

Courtesy of strfry.
container/radius
Stefan Majewsky 1 year ago
parent
commit
9d8232f7f7
1 changed files with 34 additions and 3 deletions
  1. 34
    3
      nix/pulsebert/configuration.nix

+ 34
- 3
nix/pulsebert/configuration.nix View File

@@ -69,6 +69,8 @@
69 69
   networking.firewall.allowedTCPPorts = [
70 70
     4713 # PulseAudio
71 71
     631 # cups
72
+    80 # Web/ympd
73
+    6600 # mpd
72 74
   ];
73 75
   # networking.firewall.allowedUDPPorts = [ ... ];
74 76
   # Or disable the firewall altogether.
@@ -88,9 +90,6 @@
88 90
   ];
89 91
   hardware.pulseaudio.tcp.enable = true;
90 92
   hardware.pulseaudio.zeroconf.publish.enable = true;
91
-  # vater hoerte, dass menschen im space gern mpd fuer das abspielen von musik erwarten wuerden
92
-  ####	https://nixos.org/nixos/options.html#services.mpd.enable
93
-  services.mpd.enable=true;
94 93
 
95 94
   # tell Avahi to publish CUPS and PulseAudio
96 95
   services.avahi = {
@@ -129,4 +128,36 @@
129 128
   # should.
130 129
   system.stateVersion = "18.09"; # Did you read the comment?
131 130
 
131
+
132
+  # vater hoerte, dass menschen im space gern mpd fuer das abspielen von musik erwarten wuerden
133
+  ####	https://nixos.org/nixos/options.html#services.mpd.enable
134
+  services.mpd = { 
135
+    enable=true;
136
+    network.listenAddress="any";
137
+    musicDirectory = "/mnt/storage/Music";
138
+    extraConfig = ''
139
+	audio_output {
140
+		type "pulse"
141
+		name "/proc"
142
+	}
143
+
144
+	audio_output {
145
+		type "pulse"
146
+		name "SDK"
147
+		server "dacbert.hq.c3d2.de"
148
+	}
149
+	'';
150
+  };
151
+
152
+ fileSystems."/mnt/storage" = {
153
+    device = "storage.hq.c3d2.de:/mnt/zroot/storage/rpool";
154
+    fsType = "nfs";
155
+  };
156
+
157
+  # MPD music playing daemon with webinterface
158
+  services.ympd = {
159
+    enable = true;
160
+    webPort = "80";
161
+  };
162
+  
132 163
 }

Loading…
Cancel
Save