From 329228ce7a09b6ae2e6f54eae8ccb0837286974f Mon Sep 17 00:00:00 2001 From: c6ristian Date: Wed, 5 Mar 2025 21:10:13 +0100 Subject: [PATCH] grafana: fix error undefing var config and firewall config --- systems/grafana.noc.eh22.intern.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/systems/grafana.noc.eh22.intern.nix b/systems/grafana.noc.eh22.intern.nix index f1ee937..2e43481 100644 --- a/systems/grafana.noc.eh22.intern.nix +++ b/systems/grafana.noc.eh22.intern.nix @@ -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";