Remove qtbittorrent because of an RCE bug, prepare more for enable by module for server
This commit is contained in:
parent
bbd3d080b5
commit
bbf0696221
17 changed files with 29 additions and 38 deletions
21
modules/system/services/general/ssh/default.nix
Normal file
21
modules/system/services/general/ssh/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./fail2ban ];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PrintLastLog = "no";
|
||||
PasswordAuthentication = false;
|
||||
UsePAM = false;
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist".files = [
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
];
|
||||
}
|
10
modules/system/services/general/ssh/fail2ban/default.nix
Normal file
10
modules/system/services/general/ssh/fail2ban/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
maxretry = 5;
|
||||
bantime = "5m";
|
||||
};
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/lib/fail2ban" ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue