Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tailscale funnel #1609

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/individual-docs/services/tailscale.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


[comment]: # (Please add your documentation on top of this line)

@AUTOGEN_OPTIONS@
42 changes: 42 additions & 0 deletions docs/reference/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
27 changes: 27 additions & 0 deletions src/modules/services/tailscale.nix
Original file line number Diff line number Diff line change
@@ -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}";
};
};
}