snowfield/modules/ssh-server/default.nix
2021-12-22 22:16:48 +01:00

21 lines
401 B
Nix

{ pkgs, config, lib, inputs, ... }:
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 ];
passwordAuthentication = false;
permitRootLogin = "no";
openFirewall = true;
};
};
}