about summary refs log tree commit diff
path: root/nixos/tests/fail2ban.nix
blob: c3708575b702bc2720ebd2b124e9a3fc4fcf79a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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")
  '';
})