Compare commits

..

No commits in common. "aec7b8bddeaa1e0a6847e1f29484219927f20bba" and "829630944f20ff0b7e0d9c57fd2fdad0c3c2aff1" have entirely different histories.

3 changed files with 11 additions and 10 deletions

View file

@ -1,15 +1,16 @@
{pkgs, ...}: { {pkgs, ...}: {
systemd.services.ssh-port2050-natpmp = { # services.openssh.ports = [22 2050];
bindsTo = ["sshd.socket"]; systemd.services.port2050-natpmp = {
after = ["sshd.socket"]; bindsTo = ["sshd"]; # might not work
serviceConfig.Restart = "on-failure"; confinement = {
serviceConfig.ExecStart = pkgs.writeScript "ssh-port2050-natpmp" '' enable = true;
#!${pkgs.bash}/bin/bash mode = "chroot-only";
};
serviceConfig.ExecStart = ''
while true while true
do do
${pkgs.libnatpmp}/bin/natpmpc -a 2050 22 tcp 60 ${pkgs.libnatpmp}/bin/natpmpc -a 2050 22 tcp 60
${pkgs.coreutils}/bin/sleep 30 sleep 30
done done
''; '';
}; };

View file

@ -31,7 +31,7 @@ in {
peers; peers;
in { in {
allowedTCPPorts = getPortsWithProtocol "tcp"; allowedTCPPorts = getPortsWithProtocol "tcp";
allowedUDPPorts = [51820] ++ getPortsWithProtocol "udp"; allowedUDPPorts = [51820 1234] ++ getPortsWithProtocol "udp";
extraCommands = forPortIps ({ extraCommands = forPortIps ({
IP, IP,
port, port,
@ -72,6 +72,7 @@ in {
}) })
peers; peers;
}; };
"50-wg1" = lib.recursiveUpdate config.systemd.network.netdevs."50-wg0" {wireguardConig.ListenPort = 1234;};
}; };
systemd.network.networks.wg0 = { systemd.network.networks.wg0 = {

View file

@ -16,7 +16,6 @@
"render" "render"
"audio" "audio"
"wireshark" "wireshark"
"rtkit"
]; ];
openssh.authorizedKeys.keys = with vars.sshKeys; [ openssh.authorizedKeys.keys = with vars.sshKeys; [