mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 12:04:40 +00:00
ipfs: add autoMigrate option
This commit is contained in:
parent
4502d6386e
commit
8bce3034fd
@ -89,6 +89,12 @@ in
|
||||
description = "Whether IPFS should try to mount /ipfs and /ipns at startup.";
|
||||
};
|
||||
|
||||
autoMigrate = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether IPFS should try to run the fs-repo-migration at startup.";
|
||||
};
|
||||
|
||||
ipfsMountDir = mkOption {
|
||||
type = types.str;
|
||||
default = "/ipfs";
|
||||
@ -240,6 +246,8 @@ in
|
||||
ipfs --offline config Mounts.FuseAllowOther --json true
|
||||
ipfs --offline config Mounts.IPFS ${cfg.ipfsMountDir}
|
||||
ipfs --offline config Mounts.IPNS ${cfg.ipnsMountDir}
|
||||
'' + optionalString cfg.autoMigrate ''
|
||||
${pkgs.ipfs-migrator}/bin/fs-repo-migrations -y
|
||||
'' + concatStringsSep "\n" (collect
|
||||
isString
|
||||
(mapAttrsRecursive
|
||||
|
Loading…
Reference in New Issue
Block a user