Compare commits

..

3 commits

Author SHA1 Message Date
Ingolf Wagner
3ce732fee2
use kitty instead of alacritty 2024-06-15 02:00:39 +02:00
Ingolf Wagner
a247d58251
add kitty configuration 2024-06-15 01:18:08 +02:00
Ingolf Wagner
470c8d32c7
enable fail2ban instead of sshguard 2024-06-15 01:17:53 +02:00
4 changed files with 60 additions and 2 deletions

View file

@ -11,6 +11,7 @@ with types;
imports = [ imports = [
#./avahi.nix #./avahi.nix
./fail2ban.nix
./hosts.nix ./hosts.nix
./nginx.nix ./nginx.nix
./sshd ./sshd

View 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";
#};
};
};
};
}

View file

@ -120,6 +120,27 @@ in
programs.kitty = { programs.kitty = {
enable = true; 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 = { programs.alacritty = {
@ -145,7 +166,8 @@ in
''; '';
config = { config = {
modifier = "Mod4"; modifier = "Mod4";
terminal = "alacritty"; #terminal = "alacritty";
terminal = "kitty";
focus = { focus = {
followMouse = true; followMouse = true;
}; };
@ -492,7 +514,8 @@ in
extraConfig = { extraConfig = {
modi = "drun,calc,emoji,combi"; modi = "drun,calc,emoji,combi";
show-icons = true; show-icons = true;
terminal = "alacritty"; #terminal = "alacritty";
terminal = "kitty";
}; };
}; };

View file

@ -41,6 +41,9 @@
components.network.nginx.landingpage.enable = false; components.network.nginx.landingpage.enable = false;
components.network.wifi.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; components.monitor.enable = true;
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 4317 ]; networking.firewall.interfaces.wg0.allowedTCPPorts = [ 4317 ];
networking.firewall.interfaces.wg0.allowedUDPPorts = [ 4317 ]; networking.firewall.interfaces.wg0.allowedUDPPorts = [ 4317 ];