mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
30 lines
628 B
Nix
30 lines
628 B
Nix
{
|
|
config,
|
|
lib,
|
|
std,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkDefault;
|
|
inherit (std) list;
|
|
in {
|
|
networking.firewall = {
|
|
allowedTCPPorts = [(list.unsafeHead config.services.openssh.ports)];
|
|
};
|
|
|
|
programs.mosh.enable = true;
|
|
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
KexAlgorithms = ["curve25519-sha256@libssh.org"];
|
|
PasswordAuthentication = false;
|
|
KbdInteractiveAuthentication = false;
|
|
PermitRootLogin = mkDefault "prohibit-password";
|
|
};
|
|
extraConfig = ''
|
|
PubkeyAcceptedAlgorithms +ssh-rsa
|
|
StreamLocalBindUnlink yes
|
|
LogLevel VERBOSE
|
|
'';
|
|
};
|
|
}
|