ipfs: peering and bootstrap

This commit is contained in:
Max Headroom 2022-11-14 00:42:32 +01:00
parent 27cedf59e6
commit da57a5eacc

View file

@ -2,6 +2,22 @@
let let
cfg = config.services.kubo; cfg = config.services.kubo;
ipfsApi = pkgs.writeTextDir "api" "/ip4/127.0.0.1/tcp/5001"; ipfsApi = pkgs.writeTextDir "api" "/ip4/127.0.0.1/tcp/5001";
peeringPeers = [
{
ID = "Qmd7QHZU8UjfYdwmjmq1SBh9pvER9AwHpfwQvnvNo3HBBo";
Addrs = [
"/ip4/95.216.8.12/udp/110/quic"
"/ip4/95.216.8.12/tcp/110"
];
}
{
ID = "12D3KooWQWsHPUUeFhe4b6pyCaD1hBoj8j6Z7S7kTznRTh1p1eVt";
Addrs = [
"/ip4/152.67.79.222/udp/110/quic"
"/ip4/152.67.79.222/tcp/110"
];
}
];
in { in {
services.kubo = { services.kubo = {
enable = true; enable = true;
@ -17,9 +33,14 @@ in {
"/ip4/0.0.0.0/udp/4001/quic" "/ip4/0.0.0.0/udp/4001/quic"
"/ip4/0.0.0.0/udp/110/quic" "/ip4/0.0.0.0/udp/110/quic"
]; ];
Bootstrap = [ Peering.Peers = peeringPeers;
"/ip4/95.216.8.12/tcp/110/p2p/Qmd7QHZU8UjfYdwmjmq1SBh9pvER9AwHpfwQvnvNo3HBBo" Bootstrap = (lib.flatten (map (p: map (a: "${a}/p2p/${p.ID}") p.Addrs) peeringPeers)) ++ [
"/ip4/51.38.87.150/tcp/4001/p2p/12D3KooWDUgNsoLVauCDpRAo54mc4whoBudgeXQnZZK2iVYhBLCN" "/dnsaddr/bootstrap.libp2p.io/p2p/12D3KooWEZXjE41uU4EL2gpkAQeDXYok6wghN7wwNVPF5bwkaNfS"
"/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt"
"/dnsaddr/bootstrap.libp2p.io/p2p/QmZa1sAxajnQjVM8WjWXoMbmPd7NsWhfKsPkErzpm9wGkp"
"/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN"
"/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb"
"/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa"
]; ];
}; };
}; };