aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/services/networking/tailscale.nix
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2020-11-24 11:47:28 -0500
committerAndreas Rammhold <andreas@rammhold.de>2020-12-01 12:30:31 +0100
commit3d55480bf88a67b66fad0f020b19250681f28b9f (patch)
treec4b3a4d0fe996eae0dcc47d17fdcadfebf95983d /nixos/modules/services/networking/tailscale.nix
parentea48cad85dc5676ec3ae272d44077b66fc201359 (diff)
nixos/tailscale: add package as an option
This simplifies testing changes to the tailscale service on a local machine. You can use this as such: ```nix let tailscale_patched = magic {}; in { services.tailscale = { enable = true; package = tailscale_patched; }; }; ``` Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to '')
-rw-r--r--nixos/modules/services/networking/tailscale.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/tailscale.nix b/nixos/modules/services/networking/tailscale.nix
index d6684d69e615..1a1474595beb 100644
--- a/nixos/modules/services/networking/tailscale.nix
+++ b/nixos/modules/services/networking/tailscale.nix
@@ -14,11 +14,18 @@ in {
default = 41641;
description = "The port to listen on for tunnel traffic (0=autoselect).";
};
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.tailscale;
+ defaultText = "pkgs.tailscale";
+ description = "The package to use for tailscale";
+ };
};
config = mkIf cfg.enable {
- environment.systemPackages = [ pkgs.tailscale ]; # for the CLI
- systemd.packages = [ pkgs.tailscale ];
+ environment.systemPackages = [ cfg.package ]; # for the CLI
+ systemd.packages = [ cfg.package ];
systemd.services.tailscaled = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Environment = "PORT=${toString cfg.port}";