-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1609 from cachix/tailscale-serve
add tailscale funnel
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}"; | ||
}; | ||
}; | ||
} |