nix-dotfiles/nixosModules/services/ssh/service.nix

19 lines
334 B
Nix
Raw Normal View History

2025-03-12 22:29:53 -07:00
{ config, pkgs, lib, ... }:
{
options.sshd = {
enable = lib.mkEnableOption "Enables ssh daemon";
};
config = lib.mkIf config.sshd.enable {
2025-03-17 12:31:06 -07:00
services.openssh = {
enable = true;
ports = [ 922 ];
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
2025-03-12 22:29:53 -07:00
};
}