fix(monitoring): wrap in block
This commit is contained in:
parent
c613a28a45
commit
58effd5966
1 changed files with 8 additions and 2 deletions
|
|
@ -1,7 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
sops.secrets."grafana/admin_password" = {
|
cfg = config.homelab.apps.monitoring;
|
||||||
|
in {
|
||||||
|
options.homelab.apps.monitoring.enable = lib.mkEnableOption "Homelab Monitoring Stack";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
sops.secrets."grafana/admin_password" = {
|
||||||
sopsFile = ../../../../secrets/prod/monitoring.yaml;
|
sopsFile = ../../../../secrets/prod/monitoring.yaml;
|
||||||
};
|
};
|
||||||
sops.secrets."alertmanager/smtp_password" = {
|
sops.secrets."alertmanager/smtp_password" = {
|
||||||
|
|
@ -155,4 +160,5 @@
|
||||||
|
|
||||||
# Open firewall for Loki so agents can push logs
|
# Open firewall for Loki so agents can push logs
|
||||||
networking.firewall.allowedTCPPorts = [ 3100 ];
|
networking.firewall.allowedTCPPorts = [ 3100 ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue