diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-11-01 23:28:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 23:28:33 +0100 |
commit | 796cc1ad514ec46ab0631ec56e6cb4e397f36e26 (patch) | |
tree | 531d8c3a48c2e0144db386382ad6944bece07398 /nixos/modules/services/networking | |
parent | 741b917812a3fb1ca5db26148b568220d0a5dac4 (diff) | |
parent | 43bc09e03794f3aa4585a1a39925dca5e90a2c14 (diff) |
Merge pull request #198532 from raindev/syncthing-devices-folders
Diffstat (limited to 'nixos/modules/services/networking')
-rw-r--r-- | nixos/modules/services/networking/syncthing.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index 0876007a6e732..ea87e5695f87a 100644 --- a/nixos/modules/services/networking/syncthing.nix +++ b/nixos/modules/services/networking/syncthing.nix @@ -55,8 +55,8 @@ let # generate the new config by merging with the NixOS config options new_cfg=$(printf '%s\n' "$old_cfg" | ${pkgs.jq}/bin/jq -c '. * { - "devices": (${builtins.toJSON devices}${optionalString (! cfg.overrideDevices) " + .devices"}), - "folders": (${builtins.toJSON folders}${optionalString (! cfg.overrideFolders) " + .folders"}) + "devices": (${builtins.toJSON devices}${optionalString (cfg.devices == {} || ! cfg.overrideDevices) " + .devices"}), + "folders": (${builtins.toJSON folders}${optionalString (cfg.folders == {} || ! cfg.overrideFolders) " + .folders"}) } * ${builtins.toJSON cfg.extraOptions}') # send the new config |