grafana: fix error undefing var config and firewall config

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

View file

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