nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 31 lines 562 B view raw
1{ pkgs, ... }: 2 3{ 4 name = "morty"; 5 meta = with pkgs.lib.maintainers; { 6 maintainers = [ leenaars ]; 7 }; 8 9 nodes = { 10 mortyProxyWithKey = 11 12 { ... }: 13 { 14 services.morty = { 15 enable = true; 16 key = "78a9cd0cfee20c672f78427efb2a2a96036027f0"; 17 port = 3001; 18 }; 19 }; 20 21 }; 22 23 testScript = 24 { ... }: 25 '' 26 mortyProxyWithKey.wait_for_unit("default.target") 27 mortyProxyWithKey.wait_for_open_port(3001) 28 mortyProxyWithKey.succeed("curl -fL 127.0.0.1:3001 | grep MortyProxy") 29 ''; 30 31}