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 = { systemd.services.consul-ready = {
description = "Wait for Consul"; description = "Wait for Consul";
requires = [ "consul.service" ]; requires = lib.mkIf config.services.consul.enable [ "consul.service" ];
after = [ "consul.service" ]; after = lib.mkIf config.services.consul.enable [ "consul.service" ];
serviceConfig = { serviceConfig = {
ExecStart = lib.getExe consulReady; ExecStart = lib.getExe consulReady;
DynamicUser = true; DynamicUser = true;