20 lines
397 B
Nix
20 lines
397 B
Nix
{ pkgs, config, lib, ... }:
|
|
|
|
{
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
}
|