diff options
author | Christine Dodrill <me@christine.website> | 2020-11-24 11:47:28 -0500 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2020-12-01 12:30:31 +0100 |
commit | 3d55480bf88a67b66fad0f020b19250681f28b9f (patch) | |
tree | c4b3a4d0fe996eae0dcc47d17fdcadfebf95983d /nixos/modules/services/networking/tailscale.nix | |
parent | ea48cad85dc5676ec3ae272d44077b66fc201359 (diff) | |
download | nixpkgs-3d55480bf88a67b66fad0f020b19250681f28b9f.tar nixpkgs-3d55480bf88a67b66fad0f020b19250681f28b9f.tar.gz nixpkgs-3d55480bf88a67b66fad0f020b19250681f28b9f.tar.bz2 nixpkgs-3d55480bf88a67b66fad0f020b19250681f28b9f.tar.lz nixpkgs-3d55480bf88a67b66fad0f020b19250681f28b9f.tar.xz nixpkgs-3d55480bf88a67b66fad0f020b19250681f28b9f.tar.zst nixpkgs-3d55480bf88a67b66fad0f020b19250681f28b9f.zip |
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 'nixos/modules/services/networking/tailscale.nix')
-rw-r--r-- | nixos/modules/services/networking/tailscale.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/tailscale.nix b/nixos/modules/services/networking/tailscale.nix index d6684d69e61..1a1474595be 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}"; |