Skip to content

Commit

Permalink
Merge pull request #1609 from cachix/tailscale-serve
Browse files Browse the repository at this point in the history
add tailscale funnel
  • Loading branch information
domenkozar authored Dec 4, 2024
2 parents 2c928a1 + cd5d473 commit 3c946a2
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
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}";
};
};
}

0 comments on commit 3c946a2

Please sign in to comment.