diff --git a/docs/individual-docs/services/tailscale.md b/docs/individual-docs/services/tailscale.md new file mode 100644 index 000000000..d3615c80f --- /dev/null +++ b/docs/individual-docs/services/tailscale.md @@ -0,0 +1,5 @@ + + +[comment]: # (Please add your documentation on top of this line) + +@AUTOGEN_OPTIONS@ diff --git a/docs/reference/options.md b/docs/reference/options.md index a10955d57..8b4175096 100644 --- a/docs/reference/options.md +++ b/docs/reference/options.md @@ -70715,6 +70715,48 @@ signed integer +## services.tailscale.funnel.enable + + + +Whether to enable Tailscale funnel. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [https://github.com/cachix/devenv/blob/main/src/modules/services/tailscale.nix](https://github.com/cachix/devenv/blob/main/src/modules/services/tailscale.nix) + + + +## services.tailscale.funnel.target + + + +Target host or host:port for Tailscale funnel + + + +*Type:* +string + +*Declared by:* + - [https://github.com/cachix/devenv/blob/main/src/modules/services/tailscale.nix](https://github.com/cachix/devenv/blob/main/src/modules/services/tailscale.nix) + + + ## services.temporal.enable diff --git a/src/modules/services/tailscale.nix b/src/modules/services/tailscale.nix new file mode 100644 index 000000000..ba57439da --- /dev/null +++ b/src/modules/services/tailscale.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.tailscale; +in +{ + options = { + services.tailscale = { + funnel = { + enable = mkEnableOption "Tailscale funnel"; + + target = mkOption { + type = types.str; + description = "Target host or host:port for Tailscale funnel"; + }; + }; + }; + }; + + config.processes = lib.mkIf cfg.funnel.enable { + "tailscale-funnel" = { + exec = "${pkgs.tailscale}/bin/tailscale funnel --yes ${cfg.funnel.target}"; + }; + }; +}