From b5b90b598430cfa876639d76dbbdc8d826ccb5c0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Aug 2020 20:28:04 +0200 Subject: types.secret-file: add service option --- makefu/2configs/binary-cache/server.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'makefu/2configs') diff --git a/makefu/2configs/binary-cache/server.nix b/makefu/2configs/binary-cache/server.nix index c8f68c84d..3fc174a1b 100644 --- a/makefu/2configs/binary-cache/server.nix +++ b/makefu/2configs/binary-cache/server.nix @@ -9,8 +9,12 @@ }; systemd.services.nix-serve = { - requires = ["secret.service"]; - after = ["secret.service"]; + after = [ + config.krebs.secret.files.nix-serve-key.service + ]; + requires = [ + config.krebs.secret.files.nix-serve-key.service + ]; }; krebs.secret.files.nix-serve-key = { path = "/run/secret/nix-serve.key"; -- cgit v1.2.3 From ec91d1b83cfad151033433159a04eb7b5381bc73 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 4 Aug 2020 22:22:43 +0200 Subject: krebs.secret: restart units on secret change --- makefu/2configs/binary-cache/server.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefu/2configs') diff --git a/makefu/2configs/binary-cache/server.nix b/makefu/2configs/binary-cache/server.nix index 3fc174a1b..1d729b9bb 100644 --- a/makefu/2configs/binary-cache/server.nix +++ b/makefu/2configs/binary-cache/server.nix @@ -12,7 +12,7 @@ after = [ config.krebs.secret.files.nix-serve-key.service ]; - requires = [ + partOf = [ config.krebs.secret.files.nix-serve-key.service ]; }; -- cgit v1.2.3