nixdesk ssh port 2050 fixes
This commit is contained in:
parent
b4be3fef4e
commit
aec7b8bdde
1 changed files with 8 additions and 9 deletions
|
|
@ -1,16 +1,15 @@
|
|||
{pkgs, ...}: {
|
||||
# services.openssh.ports = [22 2050];
|
||||
systemd.services.port2050-natpmp = {
|
||||
bindsTo = ["sshd"]; # might not work
|
||||
confinement = {
|
||||
enable = true;
|
||||
mode = "chroot-only";
|
||||
};
|
||||
serviceConfig.ExecStart = ''
|
||||
systemd.services.ssh-port2050-natpmp = {
|
||||
bindsTo = ["sshd.socket"];
|
||||
after = ["sshd.socket"];
|
||||
serviceConfig.Restart = "on-failure";
|
||||
serviceConfig.ExecStart = pkgs.writeScript "ssh-port2050-natpmp" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
while true
|
||||
do
|
||||
${pkgs.libnatpmp}/bin/natpmpc -a 2050 22 tcp 60
|
||||
sleep 30
|
||||
${pkgs.coreutils}/bin/sleep 30
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue