mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
Merge pull request #82831 from danderson/tailscale-19.09
tailscale: init at 0.97-0 [backport 19.09]
This commit is contained in:
@@ -3979,6 +3979,12 @@
|
||||
githubId = 1269099;
|
||||
name = "Marius Bakke";
|
||||
};
|
||||
mbaillie = {
|
||||
email = "martin@baillie.email";
|
||||
github = "martinbaillie";
|
||||
githubId = 613740;
|
||||
name = "Martin Baillie";
|
||||
};
|
||||
mbbx6spp = {
|
||||
email = "me@susanpotter.net";
|
||||
github = "mbbx6spp";
|
||||
|
||||
@@ -704,6 +704,7 @@
|
||||
./services/networking/syncthing.nix
|
||||
./services/networking/syncthing-relay.nix
|
||||
./services/networking/syncplay.nix
|
||||
./services/networking/tailscale.nix
|
||||
./services/networking/tcpcrypt.nix
|
||||
./services/networking/teamspeak3.nix
|
||||
./services/networking/tedicross.nix
|
||||
|
||||
46
nixos/modules/services/networking/tailscale.nix
Normal file
46
nixos/modules/services/networking/tailscale.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.services.tailscale;
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ danderson mbaillie ];
|
||||
|
||||
options.services.tailscale = {
|
||||
enable = mkEnableOption "Tailscale client daemon";
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 41641;
|
||||
description = "The port to listen on for tunnel traffic (0=autoselect).";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.tailscale = {
|
||||
description = "Tailscale client daemon";
|
||||
|
||||
after = [ "network-pre.target" ];
|
||||
wants = [ "network-pre.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
unitConfig = {
|
||||
StartLimitIntervalSec = 0;
|
||||
StartLimitBurst = 0;
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart =
|
||||
"${pkgs.tailscale}/bin/tailscaled --port ${toString cfg.port}";
|
||||
|
||||
RuntimeDirectory = "tailscale";
|
||||
RuntimeDirectoryMode = 755;
|
||||
|
||||
StateDirectory = "tailscale";
|
||||
StateDirectoryMode = 700;
|
||||
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -96,6 +96,7 @@ let
|
||||
|
||||
export GOCACHE=$TMPDIR/go-cache
|
||||
export GOPATH="$TMPDIR/go"
|
||||
export GOSUMDB=off
|
||||
export GOPROXY=file://${go-modules}
|
||||
|
||||
runHook postConfigure
|
||||
|
||||
35
pkgs/servers/tailscale/default.nix
Normal file
35
pkgs/servers/tailscale/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ lib, buildGo113Module, fetchFromGitHub, makeWrapper, iptables, iproute }:
|
||||
|
||||
buildGo113Module rec {
|
||||
pname = "tailscale";
|
||||
version = "0.97";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tailscale";
|
||||
repo = "tailscale";
|
||||
rev = "v${version}";
|
||||
sha256 = "0ckjqhj99c25h8xgyfkrd19nw5w4a7972nvba9r5faw5micjs02n";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
CGO_ENABLED = 0;
|
||||
|
||||
goPackagePath = "tailscale.com";
|
||||
modSha256 = "0anpakcqz4irwxnm0iwm7wqzh84kv3yxxdvyr38154pbd0ys5pa2";
|
||||
subPackages = [ "cmd/tailscale" "cmd/tailscaled" ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/tailscaled --prefix PATH : ${
|
||||
lib.makeBinPath [ iproute iptables ]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://tailscale.com";
|
||||
description = "The node agent for Tailscale, a mesh VPN built on WireGuard";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ danderson mbaillie ];
|
||||
};
|
||||
}
|
||||
@@ -15254,6 +15254,8 @@ in
|
||||
|
||||
syncserver = callPackage ../servers/syncserver { };
|
||||
|
||||
tailscale = callPackage ../servers/tailscale { };
|
||||
|
||||
thanos = callPackage ../servers/monitoring/thanos { };
|
||||
|
||||
inherit (callPackages ../servers/http/tomcat { })
|
||||
|
||||
Reference in New Issue
Block a user