first
This commit is contained in:
commit
233d837c6f
3 changed files with 131 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/result
|
42
flake.lock
Normal file
42
flake.lock
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669411043,
|
||||
"narHash": "sha256-LfPd3+EY+jaIHTRIEOUtHXuanxm59YKgUacmSzaqMLc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5dc7114b7b256d217fe7752f1614be2514e61bb8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
88
flake.nix
Normal file
88
flake.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
description = "headscale";
|
||||
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
url = "nixpkgs/nixos-unstable";
|
||||
};
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }@inputs:
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
headscale =
|
||||
let
|
||||
pname = "headscale";
|
||||
version = "0.17.0";
|
||||
in
|
||||
pkgs.buildGoModule {
|
||||
inherit pname version;
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "juanfont";
|
||||
repo = "headscale";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-KBTZpf9hHX1GeI2r0Tksa8oWdCVZz1wXKpy9htvk2RY=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-Cq0WipTQ+kGcvnfP0kjyvjyonl2OC9W7Tj0MCuB1lDU=";
|
||||
|
||||
tags = [
|
||||
"ts2019"
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/juanfont/headscale/cmd/headscale/cli.Version=v${version}"
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
"-short"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.installShellFiles
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd headscale \
|
||||
--bash <($out/bin/headscale completion bash) \
|
||||
--fish <($out/bin/headscale completion fish) \
|
||||
--zsh <($out/bin/headscale completion zsh)
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
homepage = "https://github.com/juanfont/headscale";
|
||||
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.
|
||||
'';
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ nkje jk kradalby ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue