summary refs log tree commit diff
path: root/nixos/modules/services/network-filesystems
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2022-04-05 19:16:39 +0200
committerGitHub <noreply@github.com>2022-04-05 19:16:39 +0200
commit39e0bd705b420dda29796b4bf3dbd89d3fe4ab00 (patch)
tree68d5c9324a157cec2e8d172f0d75bf0b892964e2 /nixos/modules/services/network-filesystems
parent1b5e91c39bf167275b6227c788cfc12cf0fea5fe (diff)
parent38f1576ba9928d67e52daef6787b1f37fc99a809 (diff)
downloadnixpkgs-39e0bd705b420dda29796b4bf3dbd89d3fe4ab00.tar
nixpkgs-39e0bd705b420dda29796b4bf3dbd89d3fe4ab00.tar.gz
nixpkgs-39e0bd705b420dda29796b4bf3dbd89d3fe4ab00.tar.bz2
nixpkgs-39e0bd705b420dda29796b4bf3dbd89d3fe4ab00.tar.lz
nixpkgs-39e0bd705b420dda29796b4bf3dbd89d3fe4ab00.tar.xz
nixpkgs-39e0bd705b420dda29796b4bf3dbd89d3fe4ab00.tar.zst
nixpkgs-39e0bd705b420dda29796b4bf3dbd89d3fe4ab00.zip
Merge pull request #165259 from Luflosi/ipfs-recursiveUpdate
nixos/ipfs: use lib.recursiveUpdate instead of // operator
Diffstat (limited to 'nixos/modules/services/network-filesystems')
-rw-r--r--nixos/modules/services/network-filesystems/ipfs.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/nixos/modules/services/network-filesystems/ipfs.nix b/nixos/modules/services/network-filesystems/ipfs.nix
index 7e96179b3ca..a670551d9f3 100644
--- a/nixos/modules/services/network-filesystems/ipfs.nix
+++ b/nixos/modules/services/network-filesystems/ipfs.nix
@@ -267,11 +267,15 @@ in
       '' + ''
         ipfs --offline config show \
           | ${pkgs.jq}/bin/jq '. * $extraConfig' --argjson extraConfig ${
-              escapeShellArg (builtins.toJSON ({
-                Addresses.API = cfg.apiAddress;
-                Addresses.Gateway = cfg.gatewayAddress;
-                Addresses.Swarm = cfg.swarmAddress;
-              } // cfg.extraConfig))
+              escapeShellArg (builtins.toJSON (
+                recursiveUpdate
+                  {
+                    Addresses.API = cfg.apiAddress;
+                    Addresses.Gateway = cfg.gatewayAddress;
+                    Addresses.Swarm = cfg.swarmAddress;
+                  }
+                  cfg.extraConfig
+              ))
             } \
           | ipfs --offline config replace -
       '';