grafana: fix error undefing var config and firewall config
This commit is contained in:
parent
f11bc1b50a
commit
003cd2d19e
1 changed files with 17 additions and 9 deletions
|
@ -1,10 +1,25 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
modulesPath,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [];
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets/passwords.yaml;
|
||||
secrets."vms/grafana/admin_password" = {
|
||||
mode = "0440";
|
||||
owner = "grafana";
|
||||
group = "grafana";
|
||||
restartUnits = [ "grafana.service" ];
|
||||
};
|
||||
};
|
||||
|
||||
# configure static IP address
|
||||
networking.useDHCP = false;
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks = {
|
||||
|
@ -16,6 +31,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
security.admin_password = "$__file{${sops.secrets.vms.grafana.admin_password.path}}";
|
||||
|
@ -32,15 +49,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets/passwords.yaml;
|
||||
"vms"."grafana"."admin_password" = {
|
||||
mode = "0440";
|
||||
owner = "grafana";
|
||||
group = "grafana";
|
||||
restartUnits = [ "grafana.service" ];
|
||||
};
|
||||
};
|
||||
# DO NOT CHANGE
|
||||
# this defines the first version of NixOS that was installed on the machine so that programs with non-migratable data files are kept compatible
|
||||
home-manager.users.noc.home.stateVersion = "24.11";
|
||||
|
|
Loading…
Add table
Reference in a new issue