1 import ./make-test-python.nix ({ pkgs, ... }: {
4 meta = with pkgs.lib.maintainers; {
5 maintainers = [ onny ];
11 networking.firewall.allowedTCPPorts = [ 80 ];
14 virtualHosts."localhost".extraConfig = ''
15 respond "Hello, world!"
22 services.opensnitch = {
24 settings.DefaultAction = "deny";
30 services.opensnitch = {
32 settings.DefaultAction = "deny";
42 operand = "process.path";
43 data = "${pkgs.curl}/bin/curl";
53 server.wait_for_unit("caddy.service")
54 server.wait_for_open_port(80)
56 clientBlocked.wait_for_unit("opensnitchd.service")
57 clientBlocked.fail("curl http://server")
59 clientAllowed.wait_for_unit("opensnitchd.service")
60 clientAllowed.succeed("curl http://server")