about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorAldwin Vlasblom <aldwin@avaq.it>2023-11-28 18:47:05 +0100
committerAldwin Vlasblom <aldwin@avaq.it>2023-11-28 18:54:49 +0100
commit8efe6a71cb0de07361290b7c53936478095f03b8 (patch)
treee3256eddef657382a96d88d422f0dce06c832b9e /nixos/modules
parent6fc4c1c40c98de86565acdb3fe43c6ba3efb3115 (diff)
downloadnixlib-8efe6a71cb0de07361290b7c53936478095f03b8.tar
nixlib-8efe6a71cb0de07361290b7c53936478095f03b8.tar.gz
nixlib-8efe6a71cb0de07361290b7c53936478095f03b8.tar.bz2
nixlib-8efe6a71cb0de07361290b7c53936478095f03b8.tar.lz
nixlib-8efe6a71cb0de07361290b7c53936478095f03b8.tar.xz
nixlib-8efe6a71cb0de07361290b7c53936478095f03b8.tar.zst
nixlib-8efe6a71cb0de07361290b7c53936478095f03b8.zip
nixos/vdirsyncer: fix config.statusPath option
The `services.vdirsyncer.jobs.<name>.config.statusPath` option was
making the appropriate changes to the systemd service options, but not
to the vdirsyncer config file.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/vdirsyncer.nix8
1 files 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
         ) // (