mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-12 21:35:38 +01:00
29 lines
804 B
Nix
29 lines
804 B
Nix
{
|
|
lib,
|
|
myvars,
|
|
...
|
|
}: {
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
# Or disable the firewall altogether.
|
|
networking.firewall.enable = lib.mkDefault false;
|
|
|
|
programs.ssh = myvars.networking.ssh;
|
|
|
|
# Enable the OpenSSH daemon.
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
X11Forwarding = true;
|
|
# root user is used for remote deployment, so we need to allow it
|
|
PermitRootLogin = "prohibit-password";
|
|
PasswordAuthentication = false; # disable password login
|
|
};
|
|
openFirewall = true;
|
|
};
|
|
|
|
# Add terminfo database of all known terminals to the system profile.
|
|
# https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/config/terminfo.nix
|
|
environment.enableAllTerminfo = true;
|
|
}
|