Split sshd module.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
{
|
||||
imports = [
|
||||
./impermanence.nix
|
||||
./sshd.nix
|
||||
./user-ppetru.nix
|
||||
];
|
||||
|
||||
@@ -31,28 +32,6 @@
|
||||
vim
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
allowSFTP = false;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
extraConfig = ''
|
||||
AllowTcpForwarding yes
|
||||
X11Forwarding no
|
||||
AllowAgentForwarding no
|
||||
AllowStreamLocalForwarding no
|
||||
AuthenticationMethods publickey
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
|
||||
system.copySystemConfiguration = false; # not supported with flakes
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
|
||||
23
hosts/common/sshd.nix
Normal file
23
hosts/common/sshd.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
allowSFTP = false;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
extraConfig = ''
|
||||
AllowTcpForwarding yes
|
||||
X11Forwarding no
|
||||
AllowAgentForwarding no
|
||||
AllowStreamLocalForwarding no
|
||||
AuthenticationMethods publickey
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user