2024-06-29 02:14:31 +02:00
|
|
|
{ config, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../../../modules/wstunnel.nix
|
|
|
|
];
|
|
|
|
disabledModules = [
|
|
|
|
"services/networking/wstunnel.nix"
|
|
|
|
];
|
|
|
|
|
2024-12-02 08:14:38 +01:00
|
|
|
sops = {
|
|
|
|
secrets."wstunnel/http-upgrade-path-prefix" = {
|
|
|
|
sopsFile = ../../../secrets/common.yaml;
|
|
|
|
};
|
|
|
|
templates."wstunnel-environment.env".content = let
|
|
|
|
inherit (config.sops) placeholder;
|
|
|
|
in ''
|
|
|
|
WSTUNNEL_HTTP_UPGRADE_PATH_PREFIX=${placeholder."wstunnel/http-upgrade-path-prefix"}
|
|
|
|
WSTUNNEL_RESTRICT_HTTP_UPGRADE_PATH_PREFIX=${placeholder."wstunnel/http-upgrade-path-prefix"}
|
|
|
|
'';
|
2024-06-29 02:14:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
services.wstunnel = {
|
|
|
|
enable = true;
|
|
|
|
clients."ws-tsuki" = {
|
|
|
|
connectTo = "wss://ws.nani.wtf";
|
|
|
|
localToRemote = [
|
|
|
|
"tcp://10022:localhost:22"
|
|
|
|
];
|
2024-12-02 08:14:38 +01:00
|
|
|
environmentFile = config.sops.templates."wstunnel-environment.env".path;
|
2024-06-29 02:14:31 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|