summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {