Browse Source

Move generic MPD satellite config to /mpd.nix

pull/1/head
ehmry 5 months ago
parent
commit
3d149702ed
3 changed files with 15 additions and 40 deletions
  1. 11
    38
      hosts/pulsebert/configuration.nix
  2. 2
    0
      hosts/pulsebert/home.nix
  3. 2
    2
      mpd.nix

+ 11
- 38
hosts/pulsebert/configuration.nix View File

@@ -14,6 +14,7 @@ in {
14 14
       ../../lib/admins.nix
15 15
       ../../common.nix
16 16
       ../../users.nix
17
+      ../../mpd.nix
17 18
     ];
18 19
 
19 20
   # Use the systemd-boot EFI boot loader.
@@ -55,6 +56,7 @@ in {
55 56
     home-manager
56 57
     mumble
57 58
     ncpamixer
59
+    ffmpeg
58 60
   ];
59 61
 
60 62
   # Some programs need SUID wrappers, can be configured further or are
@@ -76,7 +78,6 @@ in {
76 78
     4713 # PulseAudio
77 79
     631 # cups
78 80
     80 443 # Web/ympd
79
-    6600 # mpd
80 81
     5000 # shairport
81 82
   ];
82 83
   networking.firewall.allowedUDPPorts = [
@@ -184,15 +185,9 @@ in {
184 185
 
185 186
   # vater hoerte, dass menschen im space gern mpd fuer das abspielen von musik erwarten wuerden
186 187
   ####	https://nixos.org/nixos/options.html#services.mpd.enable
187
-  services.mpd = { 
188
-    enable=true;
189
-    dbFile = null;
190
-    network.listenAddress = "any";
191
-    musicDirectory = "/mnt/storage/Music";
192
-####    musicDirectory = "nfs://storage.hq.c3d2.de:/mnt/zroot/storage/rpool/Music";
193
-    extraConfig = ''
194
-####	music_directory "nfs://storage.hq.c3d2.de:/mnt/zroot/storage/rpool/Music"
195
-####
188
+  # See ../../mpd.nix
189
+  services.mpd.extraConfig =
190
+    ''
196 191
 	audio_output {
197 192
 		type "pulse"
198 193
 		name "/proc"
@@ -203,25 +198,7 @@ in {
203 198
 		name "SDK"
204 199
 		server "dacbert.hq.c3d2.de"
205 200
 	}
206
-
207
-####	mpd startet bei der option nicht mehr
208
-	database {
209
-		plugin "proxy"
210
-    	####	vater was here!
211
-    	####	jail (auf storage)
212
-    	####	externe erstellung der datenbank von mpd in der naehe der ablage der daten
213
-		host "172.22.99.98"
214
-	}
215
-
216
-####	ausschalten der automatischen aktualisierung der datenbank von mpd
217
-####	angeblich gibt es 2019-02-13 probleme, die zum absturz vom dienst mpd fuehren
218
-####	wenn das problem behoben ist, dann kann die option wieder entfernt werden
219
-	auto_update "no"
220
-	'';
221
-  };
222
-
223
-  # mpd likes to crash a lot while indexing, so...
224
-  systemd.services.mpd.serviceConfig.Restart="on-failure";
201
+    '';
225 202
 
226 203
   services.caddy = {
227 204
     enable = true;
@@ -240,14 +217,11 @@ in {
240 217
 
241 218
 
242 219
   fileSystems."/mnt/storage" = {
243
-    device = "storage.hq.c3d2.de:/mnt/zroot/storage/rpool";
244
-    fsType = "nfs";
245
-  };
246
-
247
-####	nur zum spielen mit dem bereitstellen von einer per nfs angebundenen datei als datenbank fuer mpd
248
-  fileSystems."/mnt/service-data/mpd_index" = {
249
-    device = "storage.hq.c3d2.de:/mnt/zroot/iocage/jails/mpd_index/root/var/mpd/.mpd";
250
-    fsType = "nfs";
220
+    #device = "storage-ng.hq.c3d2.de:/mnt/zroot/storage/rpool";
221
+    #device = "storage-ng.hq.c3d2.de:/c3d2/rpool";
222
+    device = "172.22.99.13:6789,172.22.99.15:6789,172.22.99.16:6789:/c3d2/rpool";
223
+    fsType = "ceph";
224
+    options = [ "rw" "relatime" "name=public" "secret=AQDgER1chJcMORAAK1ysRTN59B5x/MyniwVXFQ==" "acl" "wsize=16777216" "_netdev" ];
251 225
   };
252 226
 
253 227
   # MPD music playing daemon with webinterface
@@ -265,5 +239,4 @@ in {
265 239
       };
266 240
     });
267 241
   };
268
-  
269 242
 }

+ 2
- 0
hosts/pulsebert/home.nix View File

@@ -11,5 +11,7 @@
11 11
     screen
12 12
     tmux
13 13
     pulsemixer
14
+    ncpamixer
15
+    python35.withPackages(ps: with ps; [ youtube-dl ])
14 16
   ];
15 17
 }

+ 2
- 2
mpd.nix View File

@@ -12,7 +12,7 @@ let
12 12
       extraConfig = ''
13 13
         database {
14 14
           plugin "proxy"
15
-          host "172.22.99.20"
15
+          host "storage-ng.hq.c3d2.de"
16 16
         }
17 17
       '';
18 18
     };
@@ -24,5 +24,5 @@ in
24 24
   });
25 25
 
26 26
   networking.firewall.allowedTCPPorts =
27
-   [ config.mpd.network.port ];
27
+   [ config.services.mpd.network.port ];
28 28
 }

Loading…
Cancel
Save