feat: migrate from modules to features
This commit is contained in:
25
features/openssh.nix
Normal file
25
features/openssh.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
nixos =
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
options = {
|
||||
openssh.port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 22;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ config.openssh.port ];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = null;
|
||||
PermitRootLogin = "no";
|
||||
StreamLocalBindUnlink = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user