|
@@ -0,0 +1,45 @@
|
|
1
|
+# Edit this configuration file to define what should be installed on
|
|
2
|
+# your system. Help is available in the configuration.nix(5) man page
|
|
3
|
+# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
4
|
+
|
|
5
|
+{ config, pkgs, lib, ... }:
|
|
6
|
+
|
|
7
|
+{
|
|
8
|
+ imports =
|
|
9
|
+ [ ../../../lib/lxc-container.nix
|
|
10
|
+ ../../../lib/shared.nix
|
|
11
|
+ ../../../lib/admins.nix
|
|
12
|
+ ];
|
|
13
|
+
|
|
14
|
+ fileSystems."/mnt/music" = { fsType = "nfs"; device = "172.22.99.10:/mnt/zroot/storage/rpool/Music"; };
|
|
15
|
+
|
|
16
|
+ networking.hostName = "mpd-index";
|
|
17
|
+
|
|
18
|
+ services.mpd = {
|
|
19
|
+ enable = true;
|
|
20
|
+ user = "mpd";
|
|
21
|
+ group = "audio";
|
|
22
|
+ network = {
|
|
23
|
+ listenAddress = "any";
|
|
24
|
+ port = 6600;
|
|
25
|
+ };
|
|
26
|
+ musicDirectory = "/mnt/music";
|
|
27
|
+ extraConfig = ''
|
|
28
|
+ default_permissions "read,add,control,admin"
|
|
29
|
+
|
|
30
|
+ input {
|
|
31
|
+ plugin "curl"
|
|
32
|
+ }
|
|
33
|
+
|
|
34
|
+ audio_output {
|
|
35
|
+ type "null"
|
|
36
|
+ name "My Null Output"
|
|
37
|
+ }
|
|
38
|
+
|
|
39
|
+ filesystem_charset "UTF-8"
|
|
40
|
+ '';
|
|
41
|
+ };
|
|
42
|
+
|
|
43
|
+ system.stateVersion = "18.09"; # Did you read the comment?
|
|
44
|
+
|
|
45
|
+}
|