wip on new module system, copied secrets over
This commit is contained in:
parent
25e9d06354
commit
7f5e4a0d93
126 changed files with 2722 additions and 30 deletions
28
modules/common/ssh.nix
Normal file
28
modules/common/ssh.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
config = {
|
||||
# Use fail2ban
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Open ports in the firewall if enabled.
|
||||
networking.firewall.allowedTCPPorts = mkIf config.mods.common.sshPortOpen [
|
||||
22 # sshd
|
||||
];
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
LogLevel = "VERBOSE";
|
||||
PermitRootLogin = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue