snowfield/modules/ssh-server/default.nix

22 lines
406 B
Nix
Raw Permalink Normal View History

2024-03-30 20:18:12 +01:00
{ config, lib, ... }:
let
cfg = config.luj.ssh-server;
in
with lib;
{
options.luj.ssh-server = {
enable = mkEnableOption "Accept ssh connections";
};
config = mkIf cfg.enable
{
services.openssh = {
enable = true;
ports = [ 45 ];
2023-06-10 19:07:06 +02:00
settings.PasswordAuthentication = false;
settings.PermitRootLogin = "yes";
openFirewall = true;
};
};
}