Loading nixos/modules/services/networking/syncthing.nix +9 −7 Original line number Diff line number Diff line Loading @@ -13,7 +13,11 @@ let deviceID = device.id; }) cfg.settings.devices; folders = mapAttrsToList (_: folder: folder // { folders = mapAttrsToList (_: folder: folder // 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 = map (device: if builtins.isString device then { deviceId = cfg.settings.devices.${device}.id; } Loading Loading @@ -121,10 +125,9 @@ in { description = mdDoc '' The options element contains all other global configuration options ''; type = types.attrsOf (types.submodule ({ name, ... }: { type = types.submodule ({ name, ... }: { freeformType = settingsFormat.type; options = { localAnnounceEnabled = mkOption { type = types.bool; default = true; Loading Loading @@ -176,7 +179,7 @@ in { ''; }; }; })); }); }; # device settings Loading Loading @@ -344,6 +347,7 @@ in { ] ''; type = with types; nullOr (submodule { freeformType = settingsFormat.type; options = { type = mkOption { type = enum [ "external" "simple" "staggered" "trashcan" ]; Loading Loading @@ -609,9 +613,7 @@ in { ]; }; }; syncthing-init = mkIf ( cfg.settings.devices != {} || cfg.folders != {} || cfg.extraOptions != {} ) { syncthing-init = mkIf (cfg.settings != {}) { description = "Syncthing configuration updater"; requisite = [ "syncthing.service" ]; after = [ "syncthing.service" ]; Loading nixos/tests/syncthing-init.nix +5 −0 Original line number Diff line number Diff line Loading @@ -10,12 +10,17 @@ in { services.syncthing = { enable = true; settings = { options.crashReportingEnabled = false; devices.testDevice = { id = testId; }; folders.testFolder = { path = "/tmp/test"; devices = [ "testDevice" ]; versioning = { type = "simple"; params.keep = "10"; }; }; gui.user = "guiUser"; }; Loading Loading
nixos/modules/services/networking/syncthing.nix +9 −7 Original line number Diff line number Diff line Loading @@ -13,7 +13,11 @@ let deviceID = device.id; }) cfg.settings.devices; folders = mapAttrsToList (_: folder: folder // { folders = mapAttrsToList (_: folder: folder // 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 = map (device: if builtins.isString device then { deviceId = cfg.settings.devices.${device}.id; } Loading Loading @@ -121,10 +125,9 @@ in { description = mdDoc '' The options element contains all other global configuration options ''; type = types.attrsOf (types.submodule ({ name, ... }: { type = types.submodule ({ name, ... }: { freeformType = settingsFormat.type; options = { localAnnounceEnabled = mkOption { type = types.bool; default = true; Loading Loading @@ -176,7 +179,7 @@ in { ''; }; }; })); }); }; # device settings Loading Loading @@ -344,6 +347,7 @@ in { ] ''; type = with types; nullOr (submodule { freeformType = settingsFormat.type; options = { type = mkOption { type = enum [ "external" "simple" "staggered" "trashcan" ]; Loading Loading @@ -609,9 +613,7 @@ in { ]; }; }; syncthing-init = mkIf ( cfg.settings.devices != {} || cfg.folders != {} || cfg.extraOptions != {} ) { syncthing-init = mkIf (cfg.settings != {}) { description = "Syncthing configuration updater"; requisite = [ "syncthing.service" ]; after = [ "syncthing.service" ]; Loading
nixos/tests/syncthing-init.nix +5 −0 Original line number Diff line number Diff line Loading @@ -10,12 +10,17 @@ in { services.syncthing = { enable = true; settings = { options.crashReportingEnabled = false; devices.testDevice = { id = testId; }; folders.testFolder = { path = "/tmp/test"; devices = [ "testDevice" ]; versioning = { type = "simple"; params.keep = "10"; }; }; gui.user = "guiUser"; }; Loading