{ config, ... }: let npins = import /etc/nixos/npins/default.nix; pkgs-unstable = import npins.nixpkgs-unstable { }; # TODO remove once kubo-0.43 is stable in { warnings = [ "Ensure you added your primary user to the ipfs group !!!" ]; services.kubo = { autoMount = true; package = pkgs-unstable.kubo; enable = true; extraFlags = [ "--mount-mfs" "/mfs" ]; settings = { Addresses.API = "/ip4/127.0.0.1/tcp/5001"; Discovery.MDNS.Enabled = false; Plugins.Plugins.telemetry.Config.Mode = "off"; Datastore.StorageMax = "10G"; Bootstrap = [ "/dnsaddr/zomelab/p2p/12D3KooWLW9Pms1H8KHMVnXTu8LtmnU29XDwvNmDbirGtDyKeiB6" "/dnsaddr/niczos/p2p/12D3KooWFVC9GmZqcYQNRiLfAmN8PjzdGE2yfMZZbbFpRaMtAKis" # "/dnsaddr/pepere/p2p" ]; }; }; # Private network key # Firewall networking.firewall.interfaces."tailscale0".allowedTCPPorts = [ 4001 ]; sops.secrets.network-key = { sopsFile = /etc/nixos/modules/ipfs/kubo/keys/network-key.yaml; mode = "0060"; owner = "nobody"; group = config.services.kubo.group; path = "/var/lib/ipfs/swarm.key"; }; }