Files
nix/modules/system/ssh.nix

20 lines
397 B
Nix

{ config, lib, pkgs, ... }:
{
options = {
modules.system.ssh.enable = lib.mkEnableOption "enables ssh";
};
config = lib.mkIf config.modules.system.ssh.enable {
# enable and configure openssh
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = true;
PermitRootLogin = "no";
X11Forwarding = false;
};
};
};
}