grafana: fix error undefing var config and firewall config

This commit is contained in:
chris 2025-03-05 21:10:13 +01:00
commit 0031a8aa69
Signed by: c6ristian
SSH key fingerprint: SHA256:B3m+yzpaxGXSEcDBpPHfvza/DNC0wuX+CKMeGq8wgak

View file

@ -1,10 +1,14 @@
{ {
pkgs, pkgs,
config,
modulesPath,
... ...
}: }:
{ {
imports = []; imports = [];
# configure static IP address
networking.useDHCP = false;
systemd.network = { systemd.network = {
enable = true; enable = true;
networks = { networks = {
@ -16,6 +20,8 @@
}; };
}; };
networking.firewall.allowedTCPPorts = [ 80 ];
services.grafana = { services.grafana = {
enable = true; enable = true;
security.admin_password = "$__file{${sops.secrets.vms.grafana.admin_password.path}}"; security.admin_password = "$__file{${sops.secrets.vms.grafana.admin_password.path}}";
@ -32,6 +38,8 @@
}; };
}; };
sops = { sops = {
defaultSopsFile = ../secrets/passwords.yaml; defaultSopsFile = ../secrets/passwords.yaml;
"vms"."grafana"."admin_password" = { "vms"."grafana"."admin_password" = {