From 32b64f41f6cb7a6f8427685219bf5fa968ff4fd0 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/systems/grafana.noc.eh22.intern.nix b/systems/grafana.noc.eh22.intern.nix index f1ee937..fc2c924 100644 --- a/systems/grafana.noc.eh22.intern.nix +++ b/systems/grafana.noc.eh22.intern.nix @@ -1,10 +1,15 @@ { pkgs, + config, + modulesPath, + lib, ... }: { imports = []; + # configure static IP address + networking.useDHCP = false; systemd.network = { enable = true; networks = { @@ -16,6 +21,8 @@ }; }; + networking.firewall.allowedTCPPorts = [ 80 ]; + services.grafana = { enable = true; security.admin_password = "$__file{${sops.secrets.vms.grafana.admin_password.path}}"; @@ -32,9 +39,11 @@ }; }; + + sops = { defaultSopsFile = ../secrets/passwords.yaml; - "vms"."grafana"."admin_password" = { + secrets."vms/grafana/admin_password" = { mode = "0440"; owner = "grafana"; group = "grafana";