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, ...}: {
|
{pkgs, ...}: {
|
||||||
# services.openssh.ports = [22 2050];
|
systemd.services.ssh-port2050-natpmp = {
|
||||||
systemd.services.port2050-natpmp = {
|
bindsTo = ["sshd.socket"];
|
||||||
bindsTo = ["sshd"]; # might not work
|
after = ["sshd.socket"];
|
||||||
confinement = {
|
serviceConfig.Restart = "on-failure";
|
||||||
enable = true;
|
serviceConfig.ExecStart = pkgs.writeScript "ssh-port2050-natpmp" ''
|
||||||
mode = "chroot-only";
|
#!${pkgs.bash}/bin/bash
|
||||||
};
|
|
||||||
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
|
||||||
sleep 30
|
${pkgs.coreutils}/bin/sleep 30
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue