From 6a68484fc9fe9f1d2f3ce22afec5da114d202f04 Mon Sep 17 00:00:00 2001
From: Florian Sesser <florian@private.storage>
Date: Thu, 2 Sep 2021 14:04:52 +0000
Subject: [PATCH] Make file does not exist condition more clear

---
 nixos/modules/issuer.nix | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix
index 7636c8e7..3c293e70 100644
--- a/nixos/modules/issuer.nix
+++ b/nixos/modules/issuer.nix
@@ -173,13 +173,7 @@ in {
       # Bail if there is still an old (root-owned) DB file on this system.
       # If you hit this, and this /var/db/ file is indeed current, move it to
       # /var/lib/zkapissuer/vouchers.sqlite3 and chown it to zkapissuer:zkapissuer.
-      #
-      # https://www.freedesktop.org/software/systemd/man/systemd.service.html#Command%20lines
-      # > If the executable path is prefixed with "+" then the process is
-      # > executed with full privileges.
-      serviceConfig.ExecStartPre = [
-        "+${pkgs.bash}/bin/bash -c '[ ! -f /var/db/vouchers.sqlite3 ]'"
-      ];
+      unitConfig.ConditionPathExists = "!/var/db/vouchers.sqlite3";
 
       script =
         let
-- 
GitLab