add openssh
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
in
|
||||
{
|
||||
options.smayzy.openssh.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "openssh";
|
||||
};
|
||||
|
||||
config = mkIf config.smayzy.openssh.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 22 ];
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
AllowUsers = null;
|
||||
UseDns = true;
|
||||
X11Forwarding = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user