about summary refs log tree commit diff
path: root/nixos/tests/fail2ban.nix
diff options
context:
space:
mode:
authorTom Hubrecht <tom@hubrecht.ovh>2022-11-19 13:13:56 +0100
committerTom Hubrecht <tom@hubrecht.ovh>2023-06-30 22:27:40 +0200
commit208ee8b2e23d1a658a43e67aef38694de2219069 (patch)
tree91ebd8310038ca9b45255aed00c0d2f593fd1f20 /nixos/tests/fail2ban.nix
parent67b08d46a1cf2fe7caa4439226f96a0434855b1b (diff)
nixos/fail2ban: use attrsets for settings instead of strings
Diffstat (limited to 'nixos/tests/fail2ban.nix')
-rw-r--r--nixos/tests/fail2ban.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/tests/fail2ban.nix b/nixos/tests/fail2ban.nix
new file mode 100644
index 0000000000000..c3708575b702b
--- /dev/null
+++ b/nixos/tests/fail2ban.nix
@@ -0,0 +1,18 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+  name = "fail2ban";
+
+  nodes.machine = _: {
+    services.fail2ban = {
+      enable = true;
+      bantime-increment.enable = true;
+    };
+
+    services.openssh.enable = true;
+  };
+
+  testScript = ''
+    machine.wait_for_unit("multi-user.target")
+
+    machine.wait_for_unit("fail2ban")
+  '';
+})