mirror of
https://github.com/sstent/vmimages.git
synced 2025-12-06 06:01:51 +00:00
16 lines
356 B
Nix
16 lines
356 B
Nix
{ lib, config, pkgs, ... }: {
|
|
|
|
#define option to enable this
|
|
options.mymods.sshd.enable = lib.mkEnableOption "Enable SSH";
|
|
|
|
config = lib.mkIf config.mymods.sshd.enable {
|
|
services.openssh = {
|
|
enable = true;
|
|
settings.permitRootLogin = "no";
|
|
settings.passwordAuthentication = false;
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
|
|
};
|
|
} |