tsnet-serve-nix @main -
refs -
log -
-
https://git.jolheiser.com/tsnet-serve-nix.git
Signature
-----BEGIN SSH SIGNATURE-----
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY
oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5
AAAAQDcdFt3zA7a8ungmFxrTtNymDPbe49o0Hi2FJFNtt/ifuoI8MPi5duNDnEyxVeMQrL
Y8nk6hwwH4GmYt36bzags=
-----END SSH SIGNATURE-----
diff --git a/module/default.nix b/module/default.nix
index ef6f05259f55a14842bdd3ccd4396eae2b8aa245..854812cbbebb6a15e59c23a959b868c1123dcecc 100644
--- a/module/default.nix
+++ b/module/default.nix
@@ -35,6 +35,12 @@ description = "App name";
example = "myapp";
};
+ funnel = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ description = "Enable funnel mode";
+ };
+
port = lib.mkOption {
type = lib.types.port;
default = 443;
@@ -89,6 +95,7 @@ lib.optionals (instanceCfg.backend != null) [
"--backend=${instanceCfg.backend}"
]
++ [
+ (lib.optionalString instanceCfg.funnel "--funnel")
"--hostname=${instanceCfg.hostname}"
"--listen-port=${builtins.toString instanceCfg.port}"
"--mount-path=${instanceCfg.mountPath}"
diff --git a/pkg/default.nix b/pkg/default.nix
index dbe8d717d3f6a5e5e059d135d2b6daee3345e864..79fba844bd10d767dde614d3464c5c0b5474eed8 100644
--- a/pkg/default.nix
+++ b/pkg/default.nix
@@ -1,17 +1,17 @@
{pkgs ? import <nixpkgs>}:
-pkgs.buildGo121Module rec {
+pkgs.buildGoModule rec {
pname = "tsnet-serve";
- version = "493154b5d8d2a9667fa0b46b997cd8f119730657";
+ version = "1.1.1";
src = pkgs.fetchFromGitHub {
owner = "shayne";
repo = pname;
- rev = version;
+ rev = "v${version}";
- sha256 = "sha256-xLMskNe4kba2aXxYJiEBXf10JPA5+1EwUjUlVnOIRbs=";
+ sha256 = "sha256-ww/ENlh1TQYJFdJbOxievJlPEkZ/h3K7VTd+ehRni+0=";
};
-{pkgs ? import <nixpkgs>}:
pkgs.buildGo121Module rec {
+ pname = "tsnet-serve";
CGO_ENABLED = 0;