diff options
Diffstat (limited to 'nixops')
-rw-r--r-- | nixops/modules/mpd/default.nix | 9 | ||||
-rw-r--r-- | nixops/modules/websites/tools/tools/ympd.nix | 8 |
2 files changed, 9 insertions, 8 deletions
diff --git a/nixops/modules/mpd/default.nix b/nixops/modules/mpd/default.nix index 9e1715b..2cf37ad 100644 --- a/nixops/modules/mpd/default.nix +++ b/nixops/modules/mpd/default.nix | |||
@@ -20,6 +20,9 @@ | |||
20 | }; | 20 | }; |
21 | networking.firewall.allowedTCPPorts = [ 6600 ]; | 21 | networking.firewall.allowedTCPPorts = [ 6600 ]; |
22 | users.users.mpd.extraGroups = [ "wwwrun" "keys" ]; | 22 | users.users.mpd.extraGroups = [ "wwwrun" "keys" ]; |
23 | system.activationScripts.mpd = '' | ||
24 | install -d -m 0755 -o mpd -g mpd /run/mpd | ||
25 | ''; | ||
23 | services.mpd = { | 26 | services.mpd = { |
24 | enable = true; | 27 | enable = true; |
25 | network.listenAddress = "any"; | 28 | network.listenAddress = "any"; |
@@ -35,8 +38,7 @@ | |||
35 | type "httpd" | 38 | type "httpd" |
36 | name "OGG" | 39 | name "OGG" |
37 | encoder "vorbis" | 40 | encoder "vorbis" |
38 | port "${myconfig.env.ports.mpd_ogg}" | 41 | bind_to_address "/run/mpd/ogg.sock" |
39 | bind_to_address "127.0.0.1" | ||
40 | quality "5.0" | 42 | quality "5.0" |
41 | format "44100:16:1" | 43 | format "44100:16:1" |
42 | } | 44 | } |
@@ -44,8 +46,7 @@ | |||
44 | type "httpd" | 46 | type "httpd" |
45 | name "MP3" | 47 | name "MP3" |
46 | encoder "lame" | 48 | encoder "lame" |
47 | port "${myconfig.env.ports.mpd_mp3}" | 49 | bind_to_address "/run/mpd/mp3.sock" |
48 | bind_to_address "127.0.0.1" | ||
49 | quality "5.0" | 50 | quality "5.0" |
50 | format "44100:16:1" | 51 | format "44100:16:1" |
51 | } | 52 | } |
diff --git a/nixops/modules/websites/tools/tools/ympd.nix b/nixops/modules/websites/tools/tools/ympd.nix index 82d9321..b54c486 100644 --- a/nixops/modules/websites/tools/tools/ympd.nix +++ b/nixops/modules/websites/tools/tools/ympd.nix | |||
@@ -26,12 +26,12 @@ let | |||
26 | ProxyPass ws://${config.webPort}/ws | 26 | ProxyPass ws://${config.webPort}/ws |
27 | </Location> | 27 | </Location> |
28 | <Location "/mpd/music.mp3"> | 28 | <Location "/mpd/music.mp3"> |
29 | ProxyPass http://localhost:${env.mp3port}/ | 29 | ProxyPass unix:///run/mpd/mp3.sock|http://tools.immae.eu/ |
30 | ProxyPassReverse http://localhost:${env.mp3port}/ | 30 | ProxyPassReverse unix:///run/mpd/mp3.sock|http://tools.immae.eu/ |
31 | </Location> | 31 | </Location> |
32 | <Location "/mpd/music.ogg"> | 32 | <Location "/mpd/music.ogg"> |
33 | ProxyPass http://localhost:${env.oggport}/ | 33 | ProxyPass unix:///run/mpd/ogg.sock|http://tools.immae.eu/ |
34 | ProxyPassReverse http://localhost:${env.oggport}/ | 34 | ProxyPassReverse unix:///run/mpd/ogg.sock|http://tools.immae.eu/ |
35 | </Location> | 35 | </Location> |
36 | ''; | 36 | ''; |
37 | }; | 37 | }; |