updated fail2ban module
This commit is contained in:
parent
f99fb01f03
commit
4a9f6a8983
@ -1,17 +1,7 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
config,
|
services.fail2ban = {
|
||||||
lib,
|
enable = lib.mkIf config.networking.firewall.enable (lib.mkDefault true);
|
||||||
libS,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.services.fail2ban;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.services.fail2ban.recommendedDefaults = libS.mkOpinionatedOption "use fail2ban with recommended defaults";
|
|
||||||
|
|
||||||
config.services.fail2ban = lib.mkIf cfg.recommendedDefaults {
|
|
||||||
maxretry = 5;
|
maxretry = 5;
|
||||||
bantime = "24h";
|
bantime = "24h";
|
||||||
bantime-increment = {
|
bantime-increment = {
|
||||||
|
@ -22,10 +22,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
fail2ban = {
|
|
||||||
enable = lib.mkIf config.networking.firewall.enable (lib.mkDefault true);
|
|
||||||
recommendedDefaults = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
autopull = {
|
autopull = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user