mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
services.fail2ban: init
This commit is contained in:
@@ -286,6 +286,7 @@
|
||||
coturn.enable = true;
|
||||
httpua.enable = true;
|
||||
mirism.enable = true;
|
||||
fail2ban.enable = true;
|
||||
};
|
||||
};})
|
||||
];
|
||||
@@ -352,6 +353,7 @@
|
||||
mastodon.enable = true;
|
||||
gitlab.enable = true;
|
||||
grafana.enable = true;
|
||||
fail2ban.enable = true;
|
||||
};
|
||||
};})
|
||||
];
|
||||
|
||||
@@ -37,6 +37,7 @@ inputs:
|
||||
./mastodon.nix
|
||||
./gitlab.nix
|
||||
./grafana.nix
|
||||
./fail2ban.nix
|
||||
];
|
||||
options.nixos.services = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
|
||||
15
modules/services/fail2ban.nix
Normal file
15
modules/services/fail2ban.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.fail2ban = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
enable = mkOption { type = types.bool; default = false; };
|
||||
};
|
||||
config =
|
||||
let
|
||||
inherit (inputs.config.nixos.services) fail2ban;
|
||||
inherit (inputs.lib) mkIf;
|
||||
in mkIf fail2ban.enable
|
||||
{
|
||||
services.fail2ban.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user