···
cfg = config.services.ipfs;
9
-
(optionalString cfg.autoMount "--mount")
9
+
#(optionalString cfg.autoMount "--mount")
(optionalString cfg.autoMigrate "--migrate")
(optionalString cfg.enableGC "--enable-gc")
(optionalString (cfg.serviceFdlimit != null) "--manage-fdlimit=false")
···
ipfs --local config Addresses.API ${cfg.apiAddress}
ipfs --local config Addresses.Gateway ${cfg.gatewayAddress}
42
-
'' + optionalString cfg.autoMount ''
42
+
'' + optionalString false/*cfg.autoMount*/ ''
ipfs --local config Mounts.FuseAllowOther --json true
44
-
mkdir -p $(ipfs --local config Mounts.IPFS)
45
-
mkdir -p $(ipfs --local config Mounts.IPNS)
44
+
ipfs --local config Mounts.IPFS ${cfg.ipfsMountDir}
45
+
ipfs --local config Mounts.IPNS ${cfg.ipnsMountDir}
'' + concatStringsSep "\n" (collect
···
107
-
autoMount = mkOption {
110
-
description = "Whether IPFS should try to mount /ipfs and /ipns at startup.";
107
+
#autoMount = mkOption {
108
+
# type = types.bool;
110
+
# description = "Whether IPFS should try to mount /ipfs and /ipns at startup.";
113
+
ipfsMountDir = mkOption {
116
+
description = "Where to mount the IPFS namespace to";
119
+
ipnsMountDir = mkOption {
122
+
description = "Where to mount the IPNS namespace to";
gatewayAddress = mkOption {
···
install -m 0755 -o ${cfg.user} -g ${cfg.group} -d ${cfg.dataDir}
218
+
'' + optionalString false/*cfg.autoMount*/ ''
219
+
install -m 0755 -o ${cfg.user} -g ${cfg.group} -d ${cfg.ipfsMountDir}
220
+
install -m 0755 -o ${cfg.user} -g ${cfg.group} -d ${cfg.ipnsMountDir}
if [[ ! -f ${cfg.dataDir}/config ]]; then