mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
nixos/grafana: add openFirewall option
(cherry picked from commit 5bb944c6f5)
This commit is contained in:
committed by
github-actions[bot]
parent
2f2dd98a0b
commit
8fa81f2c6c
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user