Compare commits
3 commits
03b6ee17c2
...
3ce732fee2
Author | SHA1 | Date | |
---|---|---|---|
|
3ce732fee2 | ||
|
a247d58251 | ||
|
470c8d32c7 |
4 changed files with 60 additions and 2 deletions
|
@ -11,6 +11,7 @@ with types;
|
|||
|
||||
imports = [
|
||||
#./avahi.nix
|
||||
./fail2ban.nix
|
||||
./hosts.nix
|
||||
./nginx.nix
|
||||
./sshd
|
||||
|
|
31
components/network/fail2ban.nix
Normal file
31
components/network/fail2ban.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.components.network.fail2ban.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = mkIf (config.components.network.fail2ban.enable) {
|
||||
|
||||
environment.systemPackages = [ pkgs.fail2ban ];
|
||||
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
# https://github.com/fail2ban/fail2ban/blob/master/config/jail.conf
|
||||
jails = {
|
||||
# fixme: can't use, because I changed the nginx log format
|
||||
#nginx-bad-request.settings = {
|
||||
# port = "http,https";
|
||||
# logpath = "%(nginx_error_log)s";
|
||||
#};
|
||||
# fixme: can't use, because I changed the nginx log format
|
||||
#nginx-botsearch.settings = {
|
||||
# port = "http,https";
|
||||
# logpath = "%(nginx_error_log)s";
|
||||
#};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -120,6 +120,27 @@ in
|
|||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
enable_audio_bell = "no";
|
||||
focus_follows_mouse = "yes";
|
||||
#mouse_map left click ungrabbed mouse_handle_click prompt
|
||||
#mouse_map ctrl+left click ungrabbed mouse_handle_click link
|
||||
#map ctrl+c copy_to_clipboard
|
||||
copy_on_select = "yes";
|
||||
strip_trailing_spaces = "always";
|
||||
confirm_os_window_close = 0; # 0 disables it; -1 enables it
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"super+shift+return" = "new_os_window_with_cwd";
|
||||
"shift+page_up" = "scroll_page_up";
|
||||
"shift+page_down" = "scroll_page_down";
|
||||
"alt+l" = "scroll_line_up";
|
||||
"alt+a" = "scroll_line_down";
|
||||
"alt+i" = "scroll_page_up";
|
||||
"alt+e" = "scroll_page_down";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
|
@ -145,7 +166,8 @@ in
|
|||
'';
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
terminal = "alacritty";
|
||||
#terminal = "alacritty";
|
||||
terminal = "kitty";
|
||||
focus = {
|
||||
followMouse = true;
|
||||
};
|
||||
|
@ -492,7 +514,8 @@ in
|
|||
extraConfig = {
|
||||
modi = "drun,calc,emoji,combi";
|
||||
show-icons = true;
|
||||
terminal = "alacritty";
|
||||
#terminal = "alacritty";
|
||||
terminal = "kitty";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
components.network.nginx.landingpage.enable = false;
|
||||
components.network.wifi.enable = false;
|
||||
|
||||
components.network.fail2ban.enable = true; # fixme: not really working at the moment
|
||||
components.network.sshd.sshguard.enable = false;
|
||||
|
||||
components.monitor.enable = true;
|
||||
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 4317 ];
|
||||
networking.firewall.interfaces.wg0.allowedUDPPorts = [ 4317 ];
|
||||
|
|
Loading…
Reference in a new issue