mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-24 20:15:36 +00:00
don't enable dyndns for services not running
This commit is contained in:
parent
1462214a8e
commit
566a654f5b
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{ config, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf config.services.influxdb2.enable {
|
||||||
|
|
||||||
services.influxdb2 = {
|
services.influxdb2 = {
|
||||||
provision = {
|
provision = {
|
||||||
|
@ -108,7 +108,11 @@
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
# Configure Cloudflare DNS to point to this machine
|
# Configure Cloudflare DNS to point to this machine
|
||||||
services.cloudflare-dyndns.domains = [ config.hostnames.prometheus ];
|
services.cloudflare-dyndns.domains =
|
||||||
|
if (config.services.prometheus.enable && isServer) then
|
||||||
|
[ config.hostnames.prometheus ]
|
||||||
|
else
|
||||||
|
[ ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,6 +69,13 @@ in {
|
|||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
# Configure Cloudflare DNS to point to this machine
|
||||||
|
services.cloudflare-dyndns.domains =
|
||||||
|
if config.services.victoriametrics.enable then
|
||||||
|
[ config.hostnames.prometheus ]
|
||||||
|
else
|
||||||
|
[ ];
|
||||||
|
|
||||||
# VMAgent
|
# VMAgent
|
||||||
|
|
||||||
services.vmagent.prometheusConfig = prometheusConfig; # Overwritten below
|
services.vmagent.prometheusConfig = prometheusConfig; # Overwritten below
|
||||||
|
Loading…
Reference in New Issue
Block a user