enable sshguard and plocate
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
./fileSystems
|
||||
./snapshot
|
||||
./sshd
|
||||
./sshguard
|
||||
./unitstatus
|
||||
./users
|
||||
./zfs
|
||||
@@ -132,5 +133,13 @@
|
||||
defaultEditor = true;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
locate = {
|
||||
enable = true;
|
||||
locate = pkgs.plocate;
|
||||
localuser = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
25
modules/base/sshguard/default.nix
Normal file
25
modules/base/sshguard/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
myData,
|
||||
...
|
||||
}: {
|
||||
options.mj.base.sshguard = with lib.types; {
|
||||
enable = lib.mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mj.base.sshguard.enable {
|
||||
services.sshguard = {
|
||||
enable = true;
|
||||
blocktime = 900;
|
||||
whitelist = [
|
||||
"192.168.0.0/16"
|
||||
myData.tailscale_subnet.cidr
|
||||
myData.hosts."vno1-oh2.servers.jakst".publicIP
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user