at master 495 B view raw
1{ pkgs, ... }: 2let 3 port = 50001; 4in 5{ 6 name = "rtorrent"; 7 meta = { 8 maintainers = with pkgs.lib.maintainers; [ thiagokokada ]; 9 }; 10 11 nodes.machine = 12 { pkgs, ... }: 13 { 14 services.rtorrent = { 15 inherit port; 16 enable = true; 17 }; 18 }; 19 20 testScript = # python 21 '' 22 machine.start() 23 machine.wait_for_unit("rtorrent.service") 24 machine.wait_for_open_port(${toString port}) 25 26 machine.succeed("nc -z localhost ${toString port}") 27 ''; 28}