Files
nix/modules/system/ssh.nix
2025-10-05 13:32:18 -05:00

23 lines
417 B
Nix

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