anchor.diff:        ipfs repo fsck # workaround for BUG #4212 (https://github.com/ipfs/go-ipfs/issues/4214)
         ipfs --local config Addresses.API ${cfg.apiAddress}
         ipfs --local config Addresses.Gateway ${cfg.gatewayAddress}
  -    '' + optionalString false/*cfg.autoMount*/ ''
  +    '' + optionalString cfg.autoMount ''
         ipfs --local config Mounts.FuseAllowOther --json true
         ipfs --local config Mounts.IPFS ${cfg.ipfsMountDir}
         ipfs --local config Mounts.IPNS ${cfg.ipnsMountDir}
  
positive.code:         description = "Whether IPFS should try to migrate the file system automatically";
        };
  
        #autoMount = mkOption {
        #  type = types.bool;
        #  default = false;
        #  description = "Whether IPFS should try to mount /ipfs and /ipns at startup.";
        #};
  
        ipfsMountDir = mkOption {
          type = types.str;
  
negative.code: 
        preStart = ''
          install -m 0755 -o ${cfg.user} -g ${cfg.group} -d ${cfg.dataDir}
        '' + optionalString cfg.autoMount ''
          install -m 0755 -o ${cfg.user} -g ${cfg.group} -d ${cfg.ipfsMountDir}
          install -m 0755 -o ${cfg.user} -g ${cfg.group} -d ${cfg.ipnsMountDir}
        '';
  