{ config, lib, pkgs, ... }:

{
  options.local.services.kubo.enable = lib.mkEnableOption "kubo. The InterPlanetary File System (IPFS)";

  config = lib.mkIf config.local.services.kubo.enable {
    services.kubo = {
      enable = true;
      package = pkgs.unstable.kubo;
      # required to use ipfs companion browser extension
      settings.Addresses.API = [ "/ip4/127.0.0.1/tcp/5001" ];
    };
  };
}