From 87e9e65b6fa6309b12540c8a51ab5f559c99def8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 28 May 2019 15:38:10 +0200 Subject: [PATCH] nixos/syncthing: run init only if devices or folders are set --- nixos/modules/services/networking/syncthing.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index d495703fc539..92eca488e62d 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" ];