From d31d9f9fec9ad9c8eef6e75bf85c61c1e0033e80 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 12 Aug 2024 01:38:27 +0200 Subject: [PATCH] cluster/services/consul: implement runConsul incantation --- cluster/services/consul/agent.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cluster/services/consul/agent.nix b/cluster/services/consul/agent.nix index 1e0a087..cfc0063 100644 --- a/cluster/services/consul/agent.nix +++ b/cluster/services/consul/agent.nix @@ -10,6 +10,13 @@ let in { + system.extraIncantations = { + runConsul = i: script: i.execShellWith [ config.services.consul.package ] '' + export CONSUL_HTTP_ADDR='${config.links.consulAgent.tuple}' + ${script} + ''; + }; + links.consulAgent.protocol = "http"; services.consul = {