1{ pkgs, lib, ... }: 2{ 3 name = "mympd"; 4 5 nodes.mympd = { 6 services.mympd = { 7 enable = true; 8 settings = { 9 http_port = 8081; 10 }; 11 }; 12 13 services.mpd.enable = true; 14 }; 15 16 testScript = '' 17 start_all(); 18 machine.wait_for_unit("mympd.service"); 19 20 # Ensure that mympd can connect to mpd 21 machine.wait_until_succeeds( 22 "journalctl -eu mympd -o cat | grep 'Connected to MPD'" 23 ) 24 25 # Ensure that the web server is working 26 machine.succeed("curl http://localhost:8081 --compressed | grep -o myMPD") 27 ''; 28}