37 lines
1.5 KiB
Nix
37 lines
1.5 KiB
Nix
{ config, pkgs, ... }:
|
|
{
|
|
users.groups.mc-wow-tunnel = { };
|
|
users.users.mc-wow-tunnel = {
|
|
isSystemUser = true;
|
|
group = "mc-wow-tunnel";
|
|
};
|
|
sops.secrets."minecraft/wow-tunnel-key" = {
|
|
sopsFile = ../../../../sus/neuro-minecraft.yaml;
|
|
owner = "mc-wow-tunnel";
|
|
group = "mc-wow-tunnel";
|
|
mode = "0400";
|
|
};
|
|
programs.ssh.knownHosts.minecraft-wow-relay = {
|
|
hostNames = [ "128.140.75.58" ];
|
|
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAFpr4DPSaJt0xeuGIfcZBJD3LsJHTdIRIs2Tt9HF+CT";
|
|
};
|
|
systemd.services.minecraft-wow-tunnel = {
|
|
description = "WorldOfSosal WoW reverse tunnel to hectic-lab";
|
|
startLimitIntervalSec = 0;
|
|
wantedBy = [ "multi-user.target" ];
|
|
wants = [ "network-online.target" ];
|
|
after = [ "network-online.target" ];
|
|
serviceConfig = {
|
|
User = "mc-wow-tunnel";
|
|
Group = "mc-wow-tunnel";
|
|
ExecStart = "${pkgs.openssh}/bin/ssh -NT -i ${config.sops.secrets."minecraft/wow-tunnel-key".path} -o IPQoS=none -o Ciphers=aes256-ctr -o MACs=hmac-sha2-256-etm@openssh.com -o KexAlgorithms=curve25519-sha256 -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/etc/ssh/ssh_known_hosts -o ExitOnForwardFailure=yes -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o ConnectTimeout=10 -R 127.0.0.1:25577:127.0.0.1:25567 mc-wow-relay@128.140.75.58";
|
|
Restart = "always";
|
|
RestartSec = 10;
|
|
NoNewPrivileges = true;
|
|
ProtectSystem = "strict";
|
|
ProtectHome = true;
|
|
PrivateTmp = true;
|
|
};
|
|
};
|
|
}
|