about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/zoneminder.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/zoneminder.nix')
-rw-r--r--nixpkgs/nixos/tests/zoneminder.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/zoneminder.nix b/nixpkgs/nixos/tests/zoneminder.nix
new file mode 100644
index 000000000000..3c97bc8282d2
--- /dev/null
+++ b/nixpkgs/nixos/tests/zoneminder.nix
@@ -0,0 +1,23 @@
+import ./make-test-python.nix ({ lib, ...}:
+
+{
+  name = "zoneminder";
+  meta.maintainers = with lib.maintainers; [ danielfullmer ];
+
+  nodes.machine = { ... }:
+  {
+    services.zoneminder = {
+      enable = true;
+      database.createLocally = true;
+      database.username = "zoneminder";
+    };
+    time.timeZone = "America/New_York";
+  };
+
+  testScript = ''
+    machine.wait_for_unit("zoneminder.service")
+    machine.wait_for_unit("nginx.service")
+    machine.wait_for_open_port(8095)
+    machine.succeed("curl --fail http://localhost:8095/")
+  '';
+})