mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/syncthing: remove old, not evaluating well deprecation message
The `folderType` variable wasn't evaluating even if the message would have been thrown.
This commit is contained in:
parent
893048f24c
commit
95e51031b4
1 changed files with 4 additions and 25 deletions
|
|
@ -43,31 +43,10 @@ let
|
|||
|
||||
anyAutoAccept = builtins.any (dev: dev.autoAcceptFolders) devices;
|
||||
|
||||
folders = lib.mapAttrsToList (
|
||||
_: folder:
|
||||
folder
|
||||
//
|
||||
lib.throwIf (folder ? rescanInterval || folder ? watch || folder ? watchDelay)
|
||||
''
|
||||
The options services.syncthing.settings.folders.<name>.{rescanInterval,watch,watchDelay}
|
||||
were removed. Please use, respectively, {rescanIntervalS,fsWatcherEnabled,fsWatcherDelayS} instead.
|
||||
''
|
||||
{
|
||||
devices =
|
||||
let
|
||||
folderDevices = folder.devices;
|
||||
in
|
||||
map (
|
||||
device:
|
||||
if builtins.isString device then
|
||||
{ deviceId = cfg.settings.devices.${device}.id; }
|
||||
else if builtins.isAttrs device then
|
||||
{ deviceId = cfg.settings.devices.${device.name}.id; } // device
|
||||
else
|
||||
throw "Invalid type for devices in folder '${folderName}'; expected list or attrset."
|
||||
) folderDevices;
|
||||
}
|
||||
) (lib.filterAttrs (_: folder: folder.enable) cfg.settings.folders);
|
||||
folders = lib.pipe cfg.settings.folders [
|
||||
(lib.filterAttrs (_: folder: folder.enable))
|
||||
builtins.attrValues
|
||||
];
|
||||
|
||||
jq = "${pkgs.jq}/bin/jq";
|
||||
grep = lib.getExe pkgs.gnugrep;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue