diff options
author | Kevin Cox <kevincox@kevincox.ca> | 2021-08-31 09:33:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-31 09:33:20 -0400 |
commit | 3106d032f73117b33ca3c47ce5d7db7e0a49983b (patch) | |
tree | f3071c088f76f25f77d68130d3e7515fccb56429 /nixos/modules/services/network-filesystems/ipfs.nix | |
parent | 60adf763357f7ae4b51b945ac967cb46c747d9ea (diff) | |
parent | 8bce3034fda3b8d201961d382b55caaa54636e4d (diff) |
Merge pull request #136261 from happysalada/ipfs_auto_migrations
Ipfs auto migrations
Diffstat (limited to 'nixos/modules/services/network-filesystems/ipfs.nix')
-rw-r--r-- | nixos/modules/services/network-filesystems/ipfs.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/services/network-filesystems/ipfs.nix b/nixos/modules/services/network-filesystems/ipfs.nix index 57eae46b17a66..57f5f6b006c8c 100644 --- a/nixos/modules/services/network-filesystems/ipfs.nix +++ b/nixos/modules/services/network-filesystems/ipfs.nix @@ -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"; @@ -243,6 +249,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 |