mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
nebula/sshd: Hardcode port 22
This commit is contained in:
parent
3cf75dc7e1
commit
e0b6239ab6
1 changed files with 5 additions and 11 deletions
|
|
@ -8,18 +8,12 @@ let
|
||||||
cfg = config.custom.services.nebula.node;
|
cfg = config.custom.services.nebula.node;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.custom.services.nebula.node.sshd = {
|
options.custom.services.nebula.node.sshd.enable = lib.mkEnableOption "" // {
|
||||||
enable = lib.mkEnableOption "" // {
|
default = true;
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
port = lib.mkOption {
|
|
||||||
type = lib.types.port;
|
|
||||||
default = 22;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (cfg.enable && cfg.sshd.enable) {
|
config = lib.mkIf (cfg.enable && cfg.sshd.enable) {
|
||||||
meta.ports.tcp = [ cfg.sshd.port ];
|
meta.ports.tcp = [ 22 ];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh = {
|
openssh = {
|
||||||
|
|
@ -28,7 +22,7 @@ in
|
||||||
ports = [ ];
|
ports = [ ];
|
||||||
listenAddresses = lib.singleton {
|
listenAddresses = lib.singleton {
|
||||||
addr = cfg.address;
|
addr = cfg.address;
|
||||||
inherit (cfg.sshd) port;
|
port = 22;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
|
|
@ -41,7 +35,7 @@ in
|
||||||
config.custom.services.nebula.peers
|
config.custom.services.nebula.peers
|
||||||
|> lib.filter (node: node.isClient)
|
|> lib.filter (node: node.isClient)
|
||||||
|> lib.map (nebula: {
|
|> lib.map (nebula: {
|
||||||
inherit (cfg.sshd) port;
|
port = 22;
|
||||||
proto = "tcp";
|
proto = "tcp";
|
||||||
host = nebula.name;
|
host = nebula.name;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue