diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index d495703fc53..92eca488e62 100644 --- a/nixos/modules/services/networking/syncthing.nix +++ b/nixos/modules/services/networking/syncthing.nix @@ -421,7 +421,9 @@ in { ''; }; }; - syncthing-init = { + syncthing-init = mkIf ( + cfg.declarative.devices != {} || cfg.declarative.folders != {} + ) { after = [ "syncthing.service" ]; wantedBy = [ "multi-user.target" ];