diff options
author | Eric Litak <elitak@gmail.com> | 2017-09-06 15:40:42 -0700 |
---|---|---|
committer | Eric Litak <elitak@gmail.com> | 2017-09-17 23:57:25 -0700 |
commit | 6324317c7634e1cdbbf053b0528e098048617d17 (patch) | |
tree | e6111ce26b73b7774be4f33f0fdfbd78309d51f4 /nixos/modules/services/network-filesystems | |
parent | 700b0945b1375a4f658d22aa5476ebe7a077246d (diff) | |
download | nixlib-6324317c7634e1cdbbf053b0528e098048617d17.tar nixlib-6324317c7634e1cdbbf053b0528e098048617d17.tar.gz nixlib-6324317c7634e1cdbbf053b0528e098048617d17.tar.bz2 nixlib-6324317c7634e1cdbbf053b0528e098048617d17.tar.lz nixlib-6324317c7634e1cdbbf053b0528e098048617d17.tar.xz nixlib-6324317c7634e1cdbbf053b0528e098048617d17.tar.zst nixlib-6324317c7634e1cdbbf053b0528e098048617d17.zip |
ipfs: workaround for upstream bug; doc fixes
Diffstat (limited to 'nixos/modules/services/network-filesystems')
-rw-r--r-- | nixos/modules/services/network-filesystems/ipfs.nix | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/nixos/modules/services/network-filesystems/ipfs.nix b/nixos/modules/services/network-filesystems/ipfs.nix index cd320c5c4620..1f8ed156a8ee 100644 --- a/nixos/modules/services/network-filesystems/ipfs.nix +++ b/nixos/modules/services/network-filesystems/ipfs.nix @@ -37,6 +37,7 @@ let baseService = recursiveUpdate commonEnv { wants = [ "ipfs-init.service" ]; preStart = '' + 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*/ '' @@ -91,17 +92,15 @@ in { }; defaultMode = mkOption { - description = "systemd service that is enabled by default"; type = types.enum [ "online" "offline" "norouting" ]; default = "online"; + description = "systemd service that is enabled by default"; }; autoMigrate = mkOption { type = types.bool; default = false; - description = '' - Whether IPFS should try to migrate the file system automatically. - ''; + description = "Whether IPFS should try to migrate the file system automatically"; }; #autoMount = mkOption { @@ -137,26 +136,22 @@ in { enableGC = mkOption { type = types.bool; default = false; - description = '' - Whether to enable automatic garbage collection. - ''; + description = "Whether to enable automatic garbage collection"; }; emptyRepo = mkOption { type = types.bool; default = false; - description = '' - If set to true, the repo won't be initialized with help files - ''; + description = "If set to true, the repo won't be initialized with help files"; }; extraConfig = mkOption { type = types.attrs; - description = toString [ - "Attrset of daemon configuration to set using `ipfs config`, every time the daemon starts." - "These are applied last, so may override configuration set by other options in this module." - "Keep in mind that this configuration is stateful; i.e., unsetting anything in here does not reset the value to the default!" - ]; + description = '' + Attrset of daemon configuration to set using <command>ipfs config</command>, every time the daemon starts. + These are applied last, so may override configuration set by other options in this module. + Keep in mind that this configuration is stateful; i.e., unsetting anything in here does not reset the value to the default! + ''; default = {}; example = { Datastore.StorageMax = "100GB"; @@ -179,10 +174,8 @@ in { serviceFdlimit = mkOption { type = types.nullOr types.int; default = null; - description = '' - The fdlimit for the IPFS systemd unit or `null` to have the daemon attempt to manage it. - ''; - example = 256*1024; + description = "The fdlimit for the IPFS systemd unit or <literal>null</literal> to have the daemon attempt to manage it"; + example = 64*1024; }; }; @@ -211,7 +204,7 @@ in { description = "IPFS Initializer"; after = [ "local-fs.target" ]; - before = [ "ipfs.service" "ipfs-offline.service" ]; + before = [ "ipfs.service" "ipfs-offline.service" "ipfs-norouting.service" ]; preStart = '' install -m 0755 -o ${cfg.user} -g ${cfg.group} -d ${cfg.dataDir} |