Loading nixos/modules/services/networking/netbird.nix +3 −2 Original line number Diff line number Diff line Loading @@ -41,9 +41,10 @@ in { documentation = [ "https://netbird.io/docs/" ]; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; path = with pkgs; [ openresolv ]; serviceConfig = { AmbientCapabilities = [ "CAP_NET_ADMIN" ]; DynamicUser = true; Environment = [ "NB_CONFIG=/var/lib/netbird/config.json" "NB_LOG_FILE=console" Loading pkgs/tools/networking/netbird/default.nix +53 −33 Original line number Diff line number Diff line { stdenv, lib, nixosTests, buildGoModule, fetchFromGitHub, installShellFiles { stdenv , lib , nixosTests , nix-update-script , buildGoModule , fetchFromGitHub , installShellFiles , pkg-config , gtk3, libayatana-appindicator, libX11, libXcursor, libXxf86vm , Cocoa, IOKit, Kernel, UserNotifications, WebKit , ui ? false }: , gtk3 , libayatana-appindicator , libX11 , libXcursor , libXxf86vm , Cocoa , IOKit , Kernel , UserNotifications , WebKit , ui ? false }: let modules = if ui then { modules = if ui then { "client/ui" = "netbird-ui"; } else { client = "netbird"; Loading @@ -14,16 +30,16 @@ let in buildGoModule rec { pname = "netbird"; version = "0.14.6"; version = "0.16.0"; src = fetchFromGitHub { owner = "netbirdio"; repo = pname; rev = "v${version}"; sha256 = "sha256-S11PshEVwOYPb8RGs5joC3Cr8CNKAenK6JRd/oV4LNQ="; sha256 = "sha256-HtkMwy+8Af69vOz9VYMozOzW/W7CFSXlWR0vLlmYCeY="; }; vendorHash = "sha256-RyTfEZPwr2CNb9M8vGmo4gtbqQDh2KWApyz2Yx6qPmk="; vendorHash = "sha256-lag/usfAvpZhWeVe1wB3SJJsTCLcBeh04RvkE803OqQ="; nativeBuildInputs = [ installShellFiles ] ++ lib.optional ui pkg-config; Loading @@ -46,7 +62,7 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X github.com/netbirdio/netbird/client/system.version=${version}" "-X github.com/netbirdio/netbird/version.version=${version}" "-X main.builtBy=nix" ]; Loading @@ -61,7 +77,8 @@ buildGoModule rec { --replace 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock' ''; postInstall = lib.concatStringsSep "\n" (lib.mapAttrsToList postInstall = lib.concatStringsSep "\n" (lib.mapAttrsToList (module: binary: '' mv $out/bin/${lib.last (lib.splitString "/" module)} $out/bin/${binary} '' + lib.optionalString (!ui) '' Loading @@ -81,7 +98,10 @@ buildGoModule rec { --replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui" ''; passthru.tests.netbird = nixosTests.netbird; passthru = { tests.netbird = nixosTests.netbird; updateScript = nix-update-script { }; }; meta = with lib; { homepage = "https://netbird.io"; Loading Loading
nixos/modules/services/networking/netbird.nix +3 −2 Original line number Diff line number Diff line Loading @@ -41,9 +41,10 @@ in { documentation = [ "https://netbird.io/docs/" ]; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; path = with pkgs; [ openresolv ]; serviceConfig = { AmbientCapabilities = [ "CAP_NET_ADMIN" ]; DynamicUser = true; Environment = [ "NB_CONFIG=/var/lib/netbird/config.json" "NB_LOG_FILE=console" Loading
pkgs/tools/networking/netbird/default.nix +53 −33 Original line number Diff line number Diff line { stdenv, lib, nixosTests, buildGoModule, fetchFromGitHub, installShellFiles { stdenv , lib , nixosTests , nix-update-script , buildGoModule , fetchFromGitHub , installShellFiles , pkg-config , gtk3, libayatana-appindicator, libX11, libXcursor, libXxf86vm , Cocoa, IOKit, Kernel, UserNotifications, WebKit , ui ? false }: , gtk3 , libayatana-appindicator , libX11 , libXcursor , libXxf86vm , Cocoa , IOKit , Kernel , UserNotifications , WebKit , ui ? false }: let modules = if ui then { modules = if ui then { "client/ui" = "netbird-ui"; } else { client = "netbird"; Loading @@ -14,16 +30,16 @@ let in buildGoModule rec { pname = "netbird"; version = "0.14.6"; version = "0.16.0"; src = fetchFromGitHub { owner = "netbirdio"; repo = pname; rev = "v${version}"; sha256 = "sha256-S11PshEVwOYPb8RGs5joC3Cr8CNKAenK6JRd/oV4LNQ="; sha256 = "sha256-HtkMwy+8Af69vOz9VYMozOzW/W7CFSXlWR0vLlmYCeY="; }; vendorHash = "sha256-RyTfEZPwr2CNb9M8vGmo4gtbqQDh2KWApyz2Yx6qPmk="; vendorHash = "sha256-lag/usfAvpZhWeVe1wB3SJJsTCLcBeh04RvkE803OqQ="; nativeBuildInputs = [ installShellFiles ] ++ lib.optional ui pkg-config; Loading @@ -46,7 +62,7 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X github.com/netbirdio/netbird/client/system.version=${version}" "-X github.com/netbirdio/netbird/version.version=${version}" "-X main.builtBy=nix" ]; Loading @@ -61,7 +77,8 @@ buildGoModule rec { --replace 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock' ''; postInstall = lib.concatStringsSep "\n" (lib.mapAttrsToList postInstall = lib.concatStringsSep "\n" (lib.mapAttrsToList (module: binary: '' mv $out/bin/${lib.last (lib.splitString "/" module)} $out/bin/${binary} '' + lib.optionalString (!ui) '' Loading @@ -81,7 +98,10 @@ buildGoModule rec { --replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui" ''; passthru.tests.netbird = nixosTests.netbird; passthru = { tests.netbird = nixosTests.netbird; updateScript = nix-update-script { }; }; meta = with lib; { homepage = "https://netbird.io"; Loading