📌 overlay for tailscale
This commit is contained in:
parent
3caf10caf3
commit
c2caeb4dae
@ -9,6 +9,8 @@
|
||||
../../modules/sops
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ (import ../../overlays) ];
|
||||
|
||||
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
||||
boot.loader.grub.enable = false;
|
||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
||||
|
@ -23,6 +23,7 @@ in {
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [ (import ../../overlays) ];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Toronto";
|
||||
|
@ -17,6 +17,8 @@ in {
|
||||
../../modules/matrix/nginx.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ (import ../../overlays) ];
|
||||
|
||||
boot.cleanTmpDir = true;
|
||||
|
||||
# Set your time zone.
|
||||
|
3
overlays/default.nix
Normal file
3
overlays/default.nix
Normal file
@ -0,0 +1,3 @@
|
||||
self: super: {
|
||||
tailscale = super.callPackage ../pkgs/tailscale/default.nix { };
|
||||
}
|
42
pkgs/tailscale/default.nix
Normal file
42
pkgs/tailscale/default.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ lib, stdenv, buildGo117Module, fetchFromGitHub, makeWrapper, iptables, iproute2, procps }:
|
||||
|
||||
buildGo117Module rec {
|
||||
pname = "tailscale";
|
||||
version = "1.18.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tailscale";
|
||||
repo = "tailscale";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-bexcln2BTYZo17zyxJKiRt7xkMEgAijRsl9HxHEA9og=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.isLinux [ makeWrapper ];
|
||||
|
||||
CGO_ENABLED = 0;
|
||||
|
||||
vendorSha256 = "sha256-ulgTwnuisnkQf0WLQhZ70MwuOpZuroh7ShxBGyv0d0k=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
subPackages = [ "cmd/tailscale" "cmd/tailscaled" ];
|
||||
|
||||
tags = [ "xversion" ];
|
||||
|
||||
ldflags = [ "-X tailscale.com/version.Long=${version}" "-X tailscale.com/version.Short=${version}" ];
|
||||
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
wrapProgram $out/bin/tailscaled --prefix PATH : ${lib.makeBinPath [ iproute2 iptables ]}
|
||||
wrapProgram $out/bin/tailscale --suffix PATH : ${lib.makeBinPath [ procps ]}
|
||||
|
||||
sed -i -e "s#/usr/sbin#$out/bin#" -e "/^EnvironmentFile/d" ./cmd/tailscaled/tailscaled.service
|
||||
install -D -m0444 -t $out/lib/systemd/system ./cmd/tailscaled/tailscaled.service
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://tailscale.com";
|
||||
description = "The node agent for Tailscale, a mesh VPN built on WireGuard";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ danderson mbaillie ];
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user