2021-06-21 22:44:03 -04:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services = {
|
|
|
|
ipfs = {
|
|
|
|
enable = true;
|
|
|
|
apiAddress = "/ip4/0.0.0.0/tcp/5001";
|
|
|
|
gatewayAddress = "/ip4/0.0.0.0/tcp/8080";
|
|
|
|
swarmAddress = [
|
|
|
|
"/ip4/0.0.0.0/tcp/4001"
|
|
|
|
"/ip6/::/tcp/4001"
|
|
|
|
"/ip4/0.0.0.0/udp/4001/quic"
|
|
|
|
"/ip6/::/udp/4001/quic"
|
|
|
|
"/ip4/0.0.0.0/tcp/4002/ws"
|
|
|
|
"/ip6/::1/tcp/4002/ws"
|
|
|
|
];
|
|
|
|
extraConfig = {
|
|
|
|
API = { HTTPHeaders = { Access-Control-Allow-Origin = [ "*" ]; }; };
|
2021-07-09 22:36:48 -04:00
|
|
|
Routing = { Type = "dhtclient"; };
|
|
|
|
Swarm = {
|
|
|
|
ConnMgr = {
|
|
|
|
Type = "basic";
|
|
|
|
LowWater = 25;
|
|
|
|
HighWater = 50;
|
|
|
|
GracePeriod = "1m0s";
|
|
|
|
};
|
|
|
|
};
|
2021-06-21 22:44:03 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|