modules/ipfs-lain: add bypass port
This commit is contained in:
parent
7e9d8685a8
commit
5901e1125a
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue