nixos/syncthing: fix folder device ID name resolution (#531772)

This commit is contained in:
Doron Behar
2026-06-15 14:22:36 +00:00
committed by GitHub
@@ -46,6 +46,19 @@ let
folders = lib.pipe cfg.settings.folders [
(lib.filterAttrs (_: folder: folder.enable))
builtins.attrValues
(map (
folder:
folder
// {
devices = map (
device:
if builtins.isString device then
{ deviceId = cfg.settings.devices.${device}.id; }
else
{ deviceId = cfg.settings.devices.${device.name}.id; } // device
) folder.devices;
}
))
];
jq = "${pkgs.jq}/bin/jq";