update the datastore spec for kubo

This commit is contained in:
Charlotte 🦝 Delenk 2023-05-23 06:54:19 +01:00
parent 3a65928910
commit 2a6bb40ff6
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
4 changed files with 9 additions and 3 deletions

View file

@ -20,6 +20,7 @@ in {
./services/cups.nix ./services/cups.nix
./services/docker.nix ./services/docker.nix
./services/cifs.nix ./services/cifs.nix
./services/kubo-local.nix
]; ];
fonts = { fonts = {
fontDir.enable = true; fontDir.enable = true;

View file

@ -85,6 +85,7 @@
"d /build - - - - -" "d /build - - - - -"
"L /var/lib/nextcloud - - - - /persist/var/lib/nextcloud" "L /var/lib/nextcloud - - - - /persist/var/lib/nextcloud"
"d /persist/var/lib/nextcloud 0750 nextcloud 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}"; services.postgresql.dataDir = "/persist/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";

View file

@ -332,8 +332,12 @@ in {
path = ["/run/wrappers" cfg.package]; path = ["/run/wrappers" cfg.package];
environment.IPFS_PATH = cfg.dataDir; 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 if [[ ! -f "$IPFS_PATH/config" ]]; then
ipfs init ${optionalString cfg.emptyRepo "-e"} ipfs init ${optionalString cfg.emptyRepo "-e"}
else else

View file

@ -62,7 +62,7 @@ in
}); });
nodejs-16_x = prev.nodejs-18_x; nodejs-16_x = prev.nodejs-18_x;
neomutt = prev.neomutt.overrideAttrs (super: { neomutt = prev.neomutt.overrideAttrs (super: {
doCheck = false; doCheck = false;
doInstallCheck = false; doInstallCheck = false;
}); });
} }