2022-12-01 15:47:24 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
installShellFiles,
|
2023-05-21 04:41:14 +00:00
|
|
|
nixosTests,
|
2022-12-01 15:47:24 +00:00
|
|
|
}:
|
2021-07-09 22:06:53 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "headscale";
|
2024-09-06 11:32:52 +00:00
|
|
|
version = "0.23.0";
|
2021-07-09 22:06:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "juanfont";
|
|
|
|
repo = "headscale";
|
|
|
|
rev = "v${version}";
|
2024-09-06 11:32:52 +00:00
|
|
|
hash = "sha256-5tlnVNpn+hJayxHjTpbOO3kRInOYOFz0pe9pwjXZlBE=";
|
2021-07-09 22:06:53 +00:00
|
|
|
};
|
|
|
|
|
2024-09-06 11:32:52 +00:00
|
|
|
vendorHash = "sha256-+8dOxPG/Q+wuHgRwwWqdphHOuop0W9dVyClyQuh7aRc=";
|
2024-06-10 15:10:51 +00:00
|
|
|
|
2022-12-01 15:47:24 +00:00
|
|
|
ldflags = ["-s" "-w" "-X github.com/juanfont/headscale/cmd/headscale/cli.Version=v${version}"];
|
2021-07-09 22:06:53 +00:00
|
|
|
|
2022-12-01 15:47:24 +00:00
|
|
|
nativeBuildInputs = [installShellFiles];
|
|
|
|
checkFlags = ["-short"];
|
2021-10-21 15:44:25 +00:00
|
|
|
|
|
|
|
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 22:06:53 +00:00
|
|
|
|
2024-09-06 11:32:52 +00:00
|
|
|
passthru.tests = {inherit (nixosTests) headscale;};
|
2023-05-21 04:41:14 +00:00
|
|
|
|
2021-07-09 22:06:53 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/juanfont/headscale";
|
2021-10-21 15:44:25 +00:00
|
|
|
description = "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 22:06:53 +00:00
|
|
|
license = licenses.bsd3;
|
2024-09-06 11:32:52 +00:00
|
|
|
mainProgram = "headscale";
|
2022-12-01 15:47:24 +00:00
|
|
|
maintainers = with maintainers; [nkje jk kradalby misterio77 ghuntley];
|
2021-07-09 22:06:53 +00:00
|
|
|
};
|
|
|
|
}
|