fail2ban: setup service

This commit is contained in:
Antoine Martin 2021-02-22 15:07:29 +01:00
parent 076f40b031
commit 25f45ec6f6
3 changed files with 19 additions and 0 deletions

View file

@ -80,6 +80,10 @@ in
repo = secrets.borg-backup-repo;
};
fail2ban = {
enable = true;
};
gitea = {
enable = true;
privatePort = 8082;

View file

@ -4,6 +4,7 @@
imports = [
./bitwarden_rs.nix
./borg-backup.nix
./fail2ban.nix
./gitea.nix
./jellyfin.nix
./matrix.nix

14
services/fail2ban.nix Normal file
View file

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.services.fail2ban;
in {
options.my.services.fail2ban = {
enable = mkEnableOption "Enable fail2ban";
};
config = mkIf cfg.enable {
services.fail2ban.enable = true;
};
}