cluster/services/consul: only require consul if enabled

This commit is contained in:
Max Headroom 2024-07-17 23:38:00 +02:00
parent c3073e347b
commit 0e8abeb78b

View file

@ -42,8 +42,8 @@ in
{
systemd.services.consul-ready = {
description = "Wait for Consul";
requires = [ "consul.service" ];
after = [ "consul.service" ];
requires = lib.mkIf config.services.consul.enable [ "consul.service" ];
after = lib.mkIf config.services.consul.enable [ "consul.service" ];
serviceConfig = {
ExecStart = lib.getExe consulReady;
DynamicUser = true;