helm/modules/services/bitwarden.nix
Henrik Lissner 177a7eec6f
Add services/fail2ban module
With bitwarden_rs & gitea filters
2021-01-01 21:19:06 -05:00

23 lines
438 B
Nix

{ options, config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.services.bitwarden;
in {
options.modules.services.bitwarden = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
services.bitwarden_rs.enable = true;
user.extraGroups = [ "bitwarden_rs" ];
services.fail2ban.jails.bitwarden_rs = ''
enabled = true
filter = bitwarden_rs
port = 80,443,8002
'';
};
}