git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #151029 from andir/snapcast-bind
commit8086f8658e1ad806c821519632393535992acc8d authorMartin Weinelt <mweinelt@users.noreply.github.com> dateThu 16 Dec 2021, 23:52 (5 years ago) parenta13a95cc9c93b0
2 files changed+10−2
nixos/modules/services/audio/snapserver.nix+2−2 nixos/tests/snapcast.nix+8
nixos/modules/services/audio/snapserver.nix+2−2
@@ -54,12 +54,12 @@ let
5454 # tcp json rpc
5555 ++ [ "--tcp.enabled ${toString cfg.tcp.enable}" ]
5656 ++ optionals cfg.tcp.enable [
57− "--tcp.address ${cfg.tcp.listenAddress}"
57+ "--tcp.bind_to_address ${cfg.tcp.listenAddress}"
5858 "--tcp.port ${toString cfg.tcp.port}" ]
5959 # http json rpc
6060 ++ [ "--http.enabled ${toString cfg.http.enable}" ]
6161 ++ optionals cfg.http.enable [
62− "--http.address ${cfg.http.listenAddress}"
62+ "--http.bind_to_address ${cfg.http.listenAddress}"
6363 "--http.port ${toString cfg.http.port}"
6464 ] ++ optional (cfg.http.docRoot != null) "--http.doc_root \"${toString cfg.http.docRoot}\"");
6565
nixos/tests/snapcast.nix+8
@@ -40,6 +40,7 @@ in {
4040 };
4141 };
4242 };
43+ environment.systemPackages = [ pkgs.snapcast ];
4344 };
4445 client = {
4546 environment.systemPackages = [ pkgs.snapcast ];
@@ -71,6 +72,13 @@ in {
7172 "curl --fail http://localhost:${toString httpPort}/jsonrpc -d '{json.dumps(get_rpc_version)}'"
7273 )
7374
75+ with subtest("test a ipv6 connection"):
76+ server.execute("systemd-run --unit=snapcast-local-client snapclient -h ::1 -p ${toString port}")
77+ server.wait_until_succeeds(
78+ "journalctl -o cat -u snapserver.service | grep -q 'Hello from'"
79+ )
80+ server.wait_until_succeeds("journalctl -o cat -u snapcast-local-client | grep -q 'buffer: ${toString bufferSize}'")
81+
7482 with subtest("test a connection"):
7583 client.execute("systemd-run --unit=snapcast-client snapclient -h server -p ${toString port}")
7684 server.wait_until_succeeds(