summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-21 20:56:21 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-21 20:56:21 +0200
commitbb196fb98eff82ddf81c0d8f7c2beba508bd524e (patch)
treeabd09748815354e579009321dbac0acecad1cd5e
parent7c9acf57633e62420f4effbeb3b99e72d6616543 (diff)
downloadnixos-bb196fb98eff82ddf81c0d8f7c2beba508bd524e.tar
nixos-bb196fb98eff82ddf81c0d8f7c2beba508bd524e.tar.gz
nixos-bb196fb98eff82ddf81c0d8f7c2beba508bd524e.tar.bz2
nixos-bb196fb98eff82ddf81c0d8f7c2beba508bd524e.tar.xz
nixos-bb196fb98eff82ddf81c0d8f7c2beba508bd524e.zip
-rw-r--r--bragi.nix2
-rw-r--r--custom/mpd.nix30
2 files changed, 28 insertions, 4 deletions
diff --git a/bragi.nix b/bragi.nix
index 03a42064..cbc04bf0 100644
--- a/bragi.nix
+++ b/bragi.nix
@@ -229,7 +229,7 @@ in rec {
229 services.mpd = { 229 services.mpd = {
230 enable = true; 230 enable = true;
231 musicDirectory = "smb://odin.asgard.yggdrasil/media/music"; 231 musicDirectory = "smb://odin.asgard.yggdrasil/media/music";
232 listenAddresses = [ 232 network.listenAddresses = [
233 { address = "any"; } 233 { address = "any"; }
234 "/var/lib/mpd/socket" 234 "/var/lib/mpd/socket"
235 ]; 235 ];
diff --git a/custom/mpd.nix b/custom/mpd.nix
index 8df2a955..fceb62fe 100644
--- a/custom/mpd.nix
+++ b/custom/mpd.nix
@@ -122,9 +122,33 @@ in {
122 description = "Group account under which MPD runs."; 122 description = "Group account under which MPD runs.";
123 }; 123 };
124 124
125 listenAddresses = mkOption { 125 network = {
126 type = with types; listOf (either (submodule tcpAddress) str); 126
127 default = [{ address = "127.0.0.1"; }]; 127 listenAddress = mkOption {
128 type = types.str;
129 default = "127.0.0.1";
130 example = "any";
131 description = ''
132 The address for the daemon to listen on.
133 Use <literal>any</literal> to listen on all addresses.
134 '';
135 };
136
137 port = mkOption {
138 type = types.int;
139 default = 6600;
140 description = ''
141 This setting is the TCP port that is desired for the daemon to get assigned
142 to.
143 '';
144 };
145
146
147 listenAddresses = mkOption {
148 type = with types; listOf (either (submodule tcpAddress) str);
149 default = [{ address = cfg.network.listenAddress; port = cfg.network.port; }];
150 };
151
128 }; 152 };
129 153
130 dbFile = mkOption { 154 dbFile = mkOption {