kubo: 0.34.1 -> 0.35.0

https://github.com/ipfs/kubo/releases/tag/v0.35.0

This version introduces a new FUSE mount point, requiring some changes.

Luflosi 6af6c7ea cf028094

Changed files
+12 -5
nixos
modules
services
network-filesystems
pkgs
by-name
ku
+10 -3
nixos/modules/services/network-filesystems/kubo.nix
···
autoMount = lib.mkOption {
type = lib.types.bool;
default = false;
-
description = "Whether Kubo should try to mount /ipfs and /ipns at startup.";
};
autoMigrate = lib.mkOption {
···
default = "/ipns";
description = "Where to mount the IPNS namespace to";
};
};
};
description = ''
···
${cfg.dataDir}.d = defaultConfig;
${cfg.settings.Mounts.IPFS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
${cfg.settings.Mounts.IPNS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
};
# The hardened systemd unit breaks the fuse-mount function according to documentation in the unit file itself
···
ipfs --offline config replace -
'';
postStop = lib.mkIf cfg.autoMount ''
-
# After an unclean shutdown the fuse mounts at cfg.settings.Mounts.IPFS and cfg.settings.Mounts.IPNS are locked
-
umount --quiet '${cfg.settings.Mounts.IPFS}' '${cfg.settings.Mounts.IPNS}' || true
'';
serviceConfig = {
ExecStart = [
···
autoMount = lib.mkOption {
type = lib.types.bool;
default = false;
+
description = "Whether Kubo should try to mount /ipfs, /ipns and /mfs at startup.";
};
autoMigrate = lib.mkOption {
···
default = "/ipns";
description = "Where to mount the IPNS namespace to";
};
+
+
Mounts.MFS = lib.mkOption {
+
type = lib.types.str;
+
default = "/mfs";
+
description = "Where to mount the MFS namespace to";
+
};
};
};
description = ''
···
${cfg.dataDir}.d = defaultConfig;
${cfg.settings.Mounts.IPFS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
${cfg.settings.Mounts.IPNS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
+
${cfg.settings.Mounts.MFS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
};
# The hardened systemd unit breaks the fuse-mount function according to documentation in the unit file itself
···
ipfs --offline config replace -
'';
postStop = lib.mkIf cfg.autoMount ''
+
# After an unclean shutdown the fuse mounts at cfg.settings.Mounts.IPFS, cfg.settings.Mounts.IPNS and cfg.settings.Mounts.MFS are locked
+
umount --quiet '${cfg.settings.Mounts.IPFS}' '${cfg.settings.Mounts.IPNS}' '${cfg.settings.Mounts.MFS}' || true
'';
serviceConfig = {
ExecStart = [
+2 -2
pkgs/by-name/ku/kubo/package.nix
···
buildGoModule rec {
pname = "kubo";
-
version = "0.34.1"; # When updating, also check if the repo version changed and adjust repoVersion below
rev = "v${version}";
passthru.repoVersion = "16"; # Also update kubo-migrator when changing the repo version
···
# Kubo makes changes to its source tarball that don't match the git source.
src = fetchurl {
url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz";
-
hash = "sha256-wrAnmPfls7LFO3gQBISSmn4ucuUVmzvYEoz+eVc/A5M=";
};
# tarball contains multiple files/directories
···
buildGoModule rec {
pname = "kubo";
+
version = "0.35.0"; # When updating, also check if the repo version changed and adjust repoVersion below
rev = "v${version}";
passthru.repoVersion = "16"; # Also update kubo-migrator when changing the repo version
···
# Kubo makes changes to its source tarball that don't match the git source.
src = fetchurl {
url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz";
+
hash = "sha256-OubXaa2JWbEaakDV6pExm5PkiZ5XPd9uG+S4KwWb0xQ=";
};
# tarball contains multiple files/directories