ipfs-cluster configuration
This commit is contained in:
parent
db5a737339
commit
0878d1264d
9 changed files with 121 additions and 6 deletions
|
|
@ -1,11 +1,39 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.ipfs-cluster = {
|
||||
enable = true;
|
||||
consensus = "crdt";
|
||||
secretFile = "/run/secrets/ipfs-cluster-key";
|
||||
# ipfs-cluster-init.service generates its own id and adds other ids as trusted/peers/bootstrap peers
|
||||
# in $IPFS_CLUSTER_PATH/peerstore - for the peers to connect to on start
|
||||
# in $IPFS_CLUSTER_PATH/services.json - for the peers to trust
|
||||
# in $IPFS_CLUSTER_PATH/identity.json - for the new machine's peerId to then add to trusted peers
|
||||
# TODO find a way to generate this ID manually and set it per-machine, instead of retrieving it from
|
||||
# a generated config and adding it back manually to every other peer...
|
||||
initPeers = [
|
||||
"/dns4/zomelab.taila38157.ts.net/tcp/9096/p2p/12D3KooWPnNjUKE88B9dZR6J4SkWTjD5uVFFfgUFypdXThrZxaLR"
|
||||
"/dns4/niczos.taila38157.ts.net/tcp/9096/p2p/12D3KooWETrrcBP9Jw8L2Dwd9ywMWkShGqsveSd8fvd3ZyYeZmS9"
|
||||
];
|
||||
};
|
||||
|
||||
# Inject debug flag in ipfs-cluster ExecStart
|
||||
systemd.services.ipfs-cluster.serviceConfig.ExecStart = lib.mkForce [
|
||||
"${lib.getExe' pkgs.ipfs-cluster "ipfs-cluster-service"} -l debug daemon"
|
||||
];
|
||||
|
||||
sops.secrets.ipfs-cluster-key = {
|
||||
sopsFile = /etc/nixos/modules/ipfs/keys/ipfs-cluster-key.yaml;
|
||||
mode = "0060";
|
||||
owner = "nobody";
|
||||
group = config.services.kubo.group;
|
||||
};
|
||||
|
||||
networking.firewall.interfaces."tailscale0".allowedTCPPorts = [
|
||||
9096
|
||||
9094
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue