diff --git a/nixos/boxes/vpsfree1/default.nix b/nixos/boxes/vpsfree1/default.nix index 622ea963..4e4563f3 100644 --- a/nixos/boxes/vpsfree1/default.nix +++ b/nixos/boxes/vpsfree1/default.nix @@ -14,11 +14,10 @@ ./matrix-front.nix ./rss.nix ./search.nix + ./ssh.nix ./syncthing-relay.nix ]; - services.openssh.ports = [ 2222 ]; - networking.firewall.allowedTCPPorts = [ 2222 ]; systemd.extraConfig = '' DefaultTimeoutStartSec=900s ''; diff --git a/nixos/boxes/vpsfree1/ssh.nix b/nixos/boxes/vpsfree1/ssh.nix new file mode 100644 index 00000000..5f9ead09 --- /dev/null +++ b/nixos/boxes/vpsfree1/ssh.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: +let port = 2222; +in { + services.openssh = { + enable = true; + ports = [ port ]; + }; + networking.firewall.allowedTCPPorts = [ port ]; +}