diff options
author | Luflosi <luflosi@luflosi.de> | 2023-12-04 17:11:51 +0100 |
---|---|---|
committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2024-01-16 16:07:18 +0000 |
commit | 5afebcafac10af0190f24acaa3a538f06543e83f (patch) | |
tree | f417dc8b2a11faaa8656b41a53da8b9b7a636018 /nixos/modules/services/network-filesystems | |
parent | 568b90c86e7a72bdf3bbabc14e25ade44e66635a (diff) |
nixos/kubo: cleanup
- Add note explaining why enabling the Kubo daemon won't fully work immediately and requires logging in again - Use `builtins.isList addrIn` instead of `builtins.typeOf addrIn == "list"` - Fix indentation (cherry picked from commit a4c451fd3757a0920bc8d4f41b8979609c2ff2a8)
Diffstat (limited to 'nixos/modules/services/network-filesystems')
-rw-r--r-- | nixos/modules/services/network-filesystems/kubo.nix | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/nixos/modules/services/network-filesystems/kubo.nix b/nixos/modules/services/network-filesystems/kubo.nix index c19b0b5b29aa2..8cac16367dacb 100644 --- a/nixos/modules/services/network-filesystems/kubo.nix +++ b/nixos/modules/services/network-filesystems/kubo.nix @@ -52,7 +52,7 @@ let multiaddrsToListenStreams = addrIn: let - addrs = if builtins.typeOf addrIn == "list" + addrs = if builtins.isList addrIn then addrIn else [ addrIn ]; unfilteredResult = map multiaddrToListenStream addrs; in @@ -60,7 +60,7 @@ let multiaddrsToListenDatagrams = addrIn: let - addrs = if builtins.typeOf addrIn == "list" + addrs = if builtins.isList addrIn then addrIn else [ addrIn ]; unfilteredResult = map multiaddrToListenDatagram addrs; in @@ -99,7 +99,12 @@ in services.kubo = { - enable = mkEnableOption (lib.mdDoc "Interplanetary File System (WARNING: may cause severe network degradation)"); + enable = mkEnableOption (lib.mdDoc '' + the Interplanetary File System (WARNING: may cause severe network degradation). + NOTE: after enabling this option and rebuilding your system, you need to log out + and back in for the `IPFS_PATH` environment variable to be present in your shell. + Until you do that, the CLI tools won't be able to talk to the daemon by default + ''); package = mkOption { type = types.package; @@ -279,8 +284,8 @@ in { assertion = !((lib.versionAtLeast cfg.package.version "0.21") && (builtins.hasAttr "Experimental" cfg.settings) && (builtins.hasAttr "AcceleratedDHTClient" cfg.settings.Experimental)); message = '' - The `services.kubo.settings.Experimental.AcceleratedDHTClient` option was renamed to `services.kubo.settings.Routing.AcceleratedDHTClient` in Kubo 0.21. - ''; + The `services.kubo.settings.Experimental.AcceleratedDHTClient` option was renamed to `services.kubo.settings.Routing.AcceleratedDHTClient` in Kubo 0.21. + ''; } ]; |