Skip to content

Commit

Permalink
services: add tailscale funnel
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Dec 4, 2024
1 parent 6f9f633 commit 9d5fdbe
Showing 1 changed file with 27 additions and 0 deletions.
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 9d5fdbe

Please sign in to comment.