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,
|
pkgs,
|
||||||
|
config,
|
||||||
|
modulesPath,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [];
|
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 = {
|
systemd.network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
networks = {
|
networks = {
|
||||||
|
@ -16,6 +31,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
|
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
security.admin_password = "$__file{${sops.secrets.vms.grafana.admin_password.path}}";
|
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
|
# 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
|
# 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";
|
home-manager.users.noc.home.stateVersion = "24.11";
|
||||||
|
|
Loading…
Add table
Reference in a new issue