Modularized configuration now kind of works. (still need to do some refactoring)
This commit is contained in:
parent
a0f361425a
commit
14332b2c7b
24 changed files with 144 additions and 85 deletions
|
@ -1,7 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
# mostly taken from https://github.com/davidak/nixos-config/blob/master/services/fail2ban.nix
|
||||
{
|
||||
with lib;
|
||||
|
||||
mkIf (elem "fail2ban" config.machine.services) {
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
jails = {
|
||||
|
@ -50,7 +52,7 @@
|
|||
action = iptables-multiport[name=ReqLimit, port="http,https", protocol=tcp]
|
||||
findtime = 600
|
||||
bantime = 7200
|
||||
''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue