about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2024-01-16 11:06:47 -0500
committerGitHub <noreply@github.com>2024-01-16 11:06:47 -0500
commit8161251283afac535d12858059b7acc567596514 (patch)
tree3a7e970826b89c6a2d5ac03d9f1848efbf4de701 /nixos
parentb1ca453d65e164a8a05457c286742c78f333aba9 (diff)
parenta4c451fd3757a0920bc8d4f41b8979609c2ff2a8 (diff)
Merge pull request #280924 from Luflosi/kubo-cleanup
nixos/kubo: cleanup
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/network-filesystems/kubo.nix15
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 126e0902d5b4a..10162c1633e7b 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 = mkPackageOption pkgs "kubo" { };
 
@@ -274,8 +279,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.
+        '';
       }
     ];