Unverified Commit be9ccdb6 authored by Felix Bargfeldt's avatar Felix Bargfeldt Committed by GitHub
Browse files

nixos/grafana: add openFirewall (#350700)

parents 0a8c37e6 5bb944c6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -430,6 +430,12 @@ in
      type = types.path;
    };

    openFirewall = mkOption {
      type = types.bool;
      default = false;
      description = "Open the ports in the firewall for the server.";
    };

    settings = mkOption {
      description = ''
        Grafana settings. See <https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/>
@@ -2078,6 +2084,8 @@ in
      '';
    };

    networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.settings.server.http_port ];

    users.users.grafana = {
      uid = config.ids.uids.grafana;
      description = "Grafana user";