about summary refs log tree commit diff
path: root/nixos/tests/stunnel.nix
diff options
context:
space:
mode:
authorPhilip Taron <philip.taron@gmail.com>2023-11-30 15:47:09 -0800
committerPhilip Taron <philip.taron@gmail.com>2023-11-30 15:47:09 -0800
commit88dc5ded81a6ef0ab32920e78801ba1d68879863 (patch)
tree5239d1fb0b1f7968ec86a0d0c35781e156e610a0 /nixos/tests/stunnel.nix
parentd8c9b26a16086d5e900a7c7a8577837860fc973f (diff)
nixos/tests/stunnel: ensure correct ordering w.r.t. shutdown.target
Also, mark the service as `oneshot` since it is.
Diffstat (limited to 'nixos/tests/stunnel.nix')
-rw-r--r--nixos/tests/stunnel.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/tests/stunnel.nix b/nixos/tests/stunnel.nix
index 07fba435d4df6..f8cfa0414761d 100644
--- a/nixos/tests/stunnel.nix
+++ b/nixos/tests/stunnel.nix
@@ -19,8 +19,10 @@ let
   makeCert = { config, pkgs, ... }: {
     systemd.services.create-test-cert = {
       wantedBy = [ "sysinit.target" ];
-      before = [ "sysinit.target" ];
+      before = [ "sysinit.target" "shutdown.target" ];
+      conflicts = [ "shutdown.target" ];
       unitConfig.DefaultDependencies = false;
+      serviceConfig.Type = "oneshot";
       script = ''
         ${pkgs.openssl}/bin/openssl req -batch -x509 -newkey rsa -nodes -out /test-cert.pem -keyout /test-key.pem -subj /CN=${config.networking.hostName}
         ( umask 077; cat /test-key.pem /test-cert.pem > /test-key-and-cert.pem )