From 0d5cd2003697778862e3d5c2bec5b0cd83934e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Fri, 17 Nov 2023 16:31:38 +0100 Subject: [PATCH] fix kubo config --- config/services/kubo.nix | 12 +++++++++++- modules/kubo.nix | 7 ++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/config/services/kubo.nix b/config/services/kubo.nix index 2db6deeb..62b81dfe 100644 --- a/config/services/kubo.nix +++ b/config/services/kubo.nix @@ -15,7 +15,7 @@ }; API.HTTPHeaders = { Access-Control-Allow-Origin = [ - "http://bafybeic4gops3d3lyrisqku37uio33nvt6fqxvkxihrwlqsuvf76yln4fm.ipfs.localhost:41876" + "http://bafybeiamycmd52xvg6k3nzr6z3n33de6a2teyhquhj4kspdtnvetnkrfim.ipfs.localhost:41876" "http://localhost:3000" "http://127.0.0.1:5001" "https://webui.ipfs.io" @@ -37,6 +37,16 @@ prefix = "s3.datastore"; type = "measure"; } + { + child = { + compression = "none"; + path = "datastore"; + type = "levelds"; + }; + mountpoint = "/"; + prefix = "leveldb.datastore"; + type = "measure"; + } ]; type = "mount"; }; diff --git a/modules/kubo.nix b/modules/kubo.nix index c1e424a7..786dd525 100644 --- a/modules/kubo.nix +++ b/modules/kubo.nix @@ -329,11 +329,12 @@ in { environment.IPFS_PATH = cfg.dataDir; preStart = let - datastore_spec = pkgs.writeText "datastore_spec" ''{"mounts":[{"bucket":"ipfs","mountpoint":"/"}],"type":"mount"}''; + datastore_spec = pkgs.writeText "datastore_spec" ''{"mounts":[{"bucket":"ipfs-chir-rs","mountpoint":"/blocks","region":"ams1","rootDirectory":"/"},{"mountpoint":"/","path":"datastore","type":"levelds"}],"type":"mount"}''; in '' - mkdir -pv $IPFS_PATH/.ipfs/plugins - ln -svf ${pkgs.go-ds-s3}/bin/go-ds-s3-plugin $IPFS_PATH/.ipfs/plugins + mkdir -pv $IPFS_PATH/plugins + cp ${pkgs.go-ds-s3}/go-ds-s3-plugin $IPFS_PATH/plugins + chmod +w $IPFS_PATH/plugins/go-ds-s3-plugin # Update the datastore_spec ln -svf ${datastore_spec} $IPFS_PATH/datastore_spec if [[ ! -f "$IPFS_PATH/config" ]]; then -- 2.47.0