diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index c718c292b257..01d834d337c8 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -357,6 +357,7 @@ in { ncdns = handleTest ./ncdns.nix {}; ndppd = handleTest ./ndppd.nix {}; nebula = handleTest ./nebula.nix {}; + netbird = handleTest ./netbird.nix {}; neo4j = handleTest ./neo4j.nix {}; netdata = handleTest ./netdata.nix {}; networking.networkd = handleTest ./networking.nix { networkd = true; }; diff --git a/nixos/tests/netbird.nix b/nixos/tests/netbird.nix new file mode 100644 index 000000000000..ef793cfe9881 --- /dev/null +++ b/nixos/tests/netbird.nix @@ -0,0 +1,21 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: +{ + name = "netbird"; + + meta = with pkgs.lib.maintainers; { + maintainers = [ misuzu ]; + }; + + nodes = { + node = { ... }: { + services.netbird.enable = true; + }; + }; + + testScript = '' + start_all() + node.wait_for_unit("netbird.service") + node.wait_for_file("/var/run/netbird/sock") + node.succeed("netbird status | grep -q 'Daemon status: NeedsLogin'") + ''; +}) diff --git a/pkgs/tools/networking/netbird/default.nix b/pkgs/tools/networking/netbird/default.nix index fa35748d616e..0cd3972cc0c7 100644 --- a/pkgs/tools/networking/netbird/default.nix +++ b/pkgs/tools/networking/netbird/default.nix @@ -80,6 +80,8 @@ buildGoModule rec { --replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui" ''; + passthru.tests.netbird = nixosTests.netbird; + meta = with lib; { homepage = "https://netbird.io"; description = "Connect your devices into a single secure private WireGuard®-based mesh network with SSO/MFA and simple access controls";