From 2a6bb40ff66a535860431c83116c3c1c53ff75f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Tue, 23 May 2023 06:54:19 +0100 Subject: [PATCH] update the datastore spec for kubo --- config/desktop.nix | 1 + config/instance-20221213-1915.nix | 1 + modules/kubo.nix | 6 +++++- overlays/default.nix | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/desktop.nix b/config/desktop.nix index a07d1418..3b2db4bd 100644 --- a/config/desktop.nix +++ b/config/desktop.nix @@ -20,6 +20,7 @@ in { ./services/cups.nix ./services/docker.nix ./services/cifs.nix + ./services/kubo-local.nix ]; fonts = { fontDir.enable = true; diff --git a/config/instance-20221213-1915.nix b/config/instance-20221213-1915.nix index d832c2f2..81f82236 100644 --- a/config/instance-20221213-1915.nix +++ b/config/instance-20221213-1915.nix @@ -85,6 +85,7 @@ "d /build - - - - -" "L /var/lib/nextcloud - - - - /persist/var/lib/nextcloud" "d /persist/var/lib/nextcloud 0750 nextcloud nextcloud - -" + "L /var/lib/ipfs - - - - /persist/var/lib/ipfs" ]; services.postgresql.dataDir = "/persist/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"; diff --git a/modules/kubo.nix b/modules/kubo.nix index a91f9fbe..946ce6ae 100644 --- a/modules/kubo.nix +++ b/modules/kubo.nix @@ -332,8 +332,12 @@ in { path = ["/run/wrappers" cfg.package]; environment.IPFS_PATH = cfg.dataDir; - preStart = + preStart = let + datastore_spec = pkgs.writeText "datastore_spec" ''{"mounts":[{"bucket":"ipfs","mountpoint":"/"}],"type":"mount"}''; + in '' + # Update the datastore_spec + ln -svf ${datastore_spec} $IPFS_PATH/datastore_spec if [[ ! -f "$IPFS_PATH/config" ]]; then ipfs init ${optionalString cfg.emptyRepo "-e"} else diff --git a/overlays/default.nix b/overlays/default.nix index 3ff48420..dae28176 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -62,7 +62,7 @@ in }); nodejs-16_x = prev.nodejs-18_x; neomutt = prev.neomutt.overrideAttrs (super: { - doCheck = false; - doInstallCheck = false; + doCheck = false; + doInstallCheck = false; }); }