Sshd, added port as option
Primarily so that it can be used in other modules since I default to a non-standard port for obsecurity reasons.
This commit is contained in:
parent
42e9842061
commit
f373f2f743
1 changed files with 6 additions and 2 deletions
|
|
@ -1,14 +1,18 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.sshd = {
|
options.sshd = {
|
||||||
enable = lib.mkEnableOption "Enables ssh daemon";
|
enable = lib.mkEnableOption "Enables ssh daemon";
|
||||||
|
port = lib.mkOption {
|
||||||
|
default = 922;
|
||||||
|
type = lib.types.port;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.sshd.enable {
|
config = lib.mkIf config.sshd.enable {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ 922 ];
|
ports = [ config.sshd.port ];
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue