From 5901e1125ad404c7facb94ca9672c51d8644e886 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 25 Sep 2022 20:35:52 +0200 Subject: [PATCH] modules/ipfs-lain: add bypass port --- modules/ipfs-lain/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ipfs-lain/default.nix b/modules/ipfs-lain/default.nix index e41833f..a1fb7d5 100644 --- a/modules/ipfs-lain/default.nix +++ b/modules/ipfs-lain/default.nix @@ -5,6 +5,10 @@ let in { services.ipfs = { enable = true; + swarmAddress = [ + "/ip4/0.0.0.0/tcp/4001" + "/ip4/0.0.0.0/tcp/110" + ]; localDiscovery = true; autoMount = true; startWhenNeeded = false; @@ -21,6 +25,7 @@ in { systemd.services.ipfs = { environment.LIBP2P_FORCE_PNET = "1"; serviceConfig = { + AmbientCapabilities = "CAP_NET_BIND_SERVICE"; ReadWritePaths = lib.mkForce [ ]; }; }; @@ -37,7 +42,7 @@ in { }; }; - networking.firewall.allowedTCPPorts = [ 4001 ]; + networking.firewall.allowedTCPPorts = [ 110 4001 ]; environment.systemPackages = lib.singleton (pkgs.writeShellScriptBin "share" '' PATH=${cfg.package}/bin:$PATH