Skip to content

Commit

Permalink
Add netbird as an alternative to tailscale
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Oct 5, 2024
1 parent bff3b41 commit d1d17e5
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/nixos/services/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
./hardware
./input
./media
./nas
./network

./davmail.nix
Expand All @@ -18,6 +19,8 @@
./ppd.nix
];

nas.enable = lib.mkDefault false;

davmail.enable = lib.mkDefault false;
flatpak.enable = lib.mkDefault config.xdg.portal.enable;
secrets.enable = lib.mkDefault true;
Expand Down
2 changes: 2 additions & 0 deletions modules/nixos/services/network/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
imports = [
./avahi.nix
./localsend.nix
./netbird.nix
./tailscale.nix
];

local-resolv.enable = lib.mkDefault true;
localsend.enable = lib.mkDefault true;
netbird.enable = lib.mkDefault false;
tailscale.enable = lib.mkDefault true;
}
43 changes: 43 additions & 0 deletions modules/nixos/services/network/netbird.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
config,
lib,
pkgs,
...
}: {
options.netbird.enable = lib.mkEnableOption "Enable netbird";

config = lib.mkIf config.netbird.enable {
services.netbird = {
enable = true;
package = pkgs.unstable.netbird;
# port = tailscale-port;
# useRoutingFeatures = "client";
# extraUpFlags = [
# "--accept-routes"
# ];
};

environment.systemPackages = with pkgs; [
unstable.netbird-ui
];

# networking = {
# # Configure MagicDNS for Tailscale
# # nameservers = ["100.100.100.100" "1.1.1.1" "8.8.8.8"];
# # search = ["sparrow-yo.ts.net" "king-little.ts.net"];
# firewall = {
# # always allow traffic from your Tailscale network
# trustedInterfaces = ["tailscale0"];
# # allow the Tailscale UDP port through the firewall
# allowedTCPPorts = [tailscale-port];
# # https://github.com/tailscale/tailscale/issues/4432#issuecomment-1112819111
# checkReversePath = "loose";
# };
# };

# # https://github.com/tailscale/tailscale/issues/3310#issuecomment-1722601407
# boot.kernel.sysctl = {
# "net.ipv4.conf.default.rp_filter" = 2;
# };
};
}

0 comments on commit d1d17e5

Please sign in to comment.