From 8efe6a71cb0de07361290b7c53936478095f03b8 Mon Sep 17 00:00:00 2001 From: Aldwin Vlasblom Date: Tue, 28 Nov 2023 18:47:05 +0100 Subject: [PATCH] nixos/vdirsyncer: fix config.statusPath option The `services.vdirsyncer.jobs..config.statusPath` option was making the appropriate changes to the systemd service options, but not to the vdirsyncer config file. --- nixos/modules/services/networking/vdirsyncer.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/vdirsyncer.nix b/nixos/modules/services/networking/vdirsyncer.nix index f9b880c763e3..1f8a7b1ea841 100644 --- a/nixos/modules/services/networking/vdirsyncer.nix +++ b/nixos/modules/services/networking/vdirsyncer.nix @@ -20,9 +20,11 @@ let else pkgs.writeText "vdirsyncer-${name}.conf" (toIniJson ( { - general = cfg'.config.general // (lib.optionalAttrs (cfg'.config.statusPath == null) { - status_path = "/var/lib/vdirsyncer/${name}"; - }); + general = cfg'.config.general // { + status_path = if cfg'.config.statusPath == null + then "/var/lib/vdirsyncer/${name}" + else cfg'.config.statusPath; + }; } // ( mapAttrs' (name: nameValuePair "pair ${name}") cfg'.config.pairs ) // (