summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-04-12 04:53:53 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-04-12 04:53:53 +0200
commit2ced6fcc757806c772633424bb47b14ab700acbd (patch)
tree4f09a4e301b5029476329711457494c1aa0135c3
parent9279ec732b5475540a3abac3ee8cf09e858be107 (diff)
downloadnixpkgs-2ced6fcc757806c772633424bb47b14ab700acbd.tar
nixpkgs-2ced6fcc757806c772633424bb47b14ab700acbd.tar.gz
nixpkgs-2ced6fcc757806c772633424bb47b14ab700acbd.tar.bz2
nixpkgs-2ced6fcc757806c772633424bb47b14ab700acbd.tar.lz
nixpkgs-2ced6fcc757806c772633424bb47b14ab700acbd.tar.xz
nixpkgs-2ced6fcc757806c772633424bb47b14ab700acbd.tar.zst
nixpkgs-2ced6fcc757806c772633424bb47b14ab700acbd.zip
nixos/taskserver: Setup CA before main service
We need to explicitly make sure the CA is created before we actually
launch the main Taskserver service in order to avoid race conditions
where the preStart phase of the main service could possibly corrupt
certificates if it would be started in parallel.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r--nixos/modules/services/misc/taskserver/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix
index d82e9f77ea6..c06287fe3b7 100644
--- a/nixos/modules/services/misc/taskserver/default.nix
+++ b/nixos/modules/services/misc/taskserver/default.nix
@@ -396,6 +396,7 @@ in {
     systemd.services.taskserver-ca = mkIf needToCreateCA {
       requiredBy = [ "taskserver.service" ];
       after = [ "taskserver-init.service" ];
+      before = [ "taskserver.service" ];
       description = "Initialize CA for TaskServer";
       serviceConfig.Type = "oneshot";
       serviceConfig.UMask = "0077";