feat: add ssh guard
This commit is contained in:
parent
1b98ea698d
commit
d655186dc0
5 changed files with 30 additions and 0 deletions
12
common/nixos/ssh_guard.nix
Normal file
12
common/nixos/ssh_guard.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{...}: {
|
||||
services.sshguard = {
|
||||
enable = true;
|
||||
services = [
|
||||
"sshd"
|
||||
];
|
||||
blocktime = 120;
|
||||
detection_time = 1800;
|
||||
blacklist_threshold = 120;
|
||||
blacklist_file = "/var/lib/sshguard/blacklist.db";
|
||||
};
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
../../common/nixos/restic.nix
|
||||
../../common/nixos/ssh.nix
|
||||
../../common/nixos/ssh_client.nix
|
||||
../../common/nixos/ssh_guard.nix
|
||||
../../common/gui/hyprland.nix
|
||||
../../common/gui/thunar.nix
|
||||
../../common/style/stylix.nix
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
|
||||
./auditd.nix
|
||||
./kernel.nix
|
||||
./sysctl.nix
|
||||
./earlyoom.nix
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
|
|
|
|||
7
hosts/candlekeep/sysctl.nix
Normal file
7
hosts/candlekeep/sysctl.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{lib, ...}: {
|
||||
boot.kernel.sysctl = {
|
||||
# disable unprivileged user namespaces to decrease attack surface
|
||||
# Enabled because breaks discord/element etc
|
||||
"kernel.unprivileged_userns_clone" = lib.mkForce 1;
|
||||
};
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
../../common/nixos/restic.nix
|
||||
../../common/nixos/ssh.nix
|
||||
../../common/nixos/ssh_client.nix
|
||||
../../common/nixos/ssh_guard.nix
|
||||
../../common/gui/hyprland.nix
|
||||
../../common/gui/thunar.nix
|
||||
../../common/style/stylix.nix
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
|
||||
./auditd.nix
|
||||
./kernel.nix
|
||||
./sysctl.nix
|
||||
./earlyoom.nix
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
|
|
|
|||
7
hosts/grymforge/sysctl.nix
Normal file
7
hosts/grymforge/sysctl.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{lib, ...}: {
|
||||
boot.kernel.sysctl = {
|
||||
# disable unprivileged user namespaces to decrease attack surface
|
||||
# Enabled because breaks discord/element etc
|
||||
"kernel.unprivileged_userns_clone" = lib.mkForce 1;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue