2021-10-21 16:44:25 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2021-07-09 23:06:53 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "headscale";
|
2022-02-18 19:31:30 +00:00
|
|
|
version = "0.13.0";
|
2021-07-09 23:06:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "juanfont";
|
|
|
|
repo = "headscale";
|
|
|
|
rev = "v${version}";
|
2022-02-18 19:31:30 +00:00
|
|
|
sha256 = "sha256-nVGhLL7HN9m5zIZOFVOMYZXxUUx3WkLpeH/59kXoTHo=";
|
2021-07-09 23:06:53 +01:00
|
|
|
};
|
|
|
|
|
2022-02-18 19:31:30 +00:00
|
|
|
vendorSha256 = "sha256-v76UWaF6kdmuvABg6sDMmDpJ4HWvgliyEWAbAebK3wM=";
|
2021-07-09 23:06:53 +01:00
|
|
|
|
2021-10-21 16:44:25 +01:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/juanfont/headscale/cmd/headscale/cli.Version=v${version}" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd headscale \
|
|
|
|
--bash <($out/bin/headscale completion bash) \
|
|
|
|
--fish <($out/bin/headscale completion fish) \
|
|
|
|
--zsh <($out/bin/headscale completion zsh)
|
|
|
|
'';
|
2021-07-09 23:06:53 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/juanfont/headscale";
|
2021-10-21 16:44:25 +01:00
|
|
|
description = "An open source, self-hosted implementation of the Tailscale control server";
|
|
|
|
longDescription = ''
|
|
|
|
Tailscale is a modern VPN built on top of Wireguard. It works like an
|
|
|
|
overlay network between the computers of your networks - using all kinds
|
|
|
|
of NAT traversal sorcery.
|
|
|
|
|
|
|
|
Everything in Tailscale is Open Source, except the GUI clients for
|
|
|
|
proprietary OS (Windows and macOS/iOS), and the
|
|
|
|
'coordination/control server'.
|
|
|
|
|
|
|
|
The control server works as an exchange point of Wireguard public keys for
|
|
|
|
the nodes in the Tailscale network. It also assigns the IP addresses of
|
|
|
|
the clients, creates the boundaries between each user, enables sharing
|
|
|
|
machines between users, and exposes the advertised routes of your nodes.
|
|
|
|
|
|
|
|
Headscale implements this coordination server.
|
|
|
|
'';
|
2021-07-09 23:06:53 +01:00
|
|
|
license = licenses.bsd3;
|
2022-02-01 08:29:58 +00:00
|
|
|
maintainers = with maintainers; [ nkje jk kradalby ];
|
2021-07-09 23:06:53 +01:00
|
|
|
};
|
|
|
|
}
|