flake: bump inputs

And migrate to the new RFC42 grafana options.
This commit is contained in:
Bruno BELANYI 2022-10-26 14:15:34 +02:00
parent 3c3e56002f
commit 30ce88f42f
3 changed files with 33 additions and 27 deletions

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1664140963, "lastModified": 1665870395,
"narHash": "sha256-pFxDtOLduRFlol0Y4ShE+soRQX4kbhaCNBtDOvx7ykw=", "narHash": "sha256-Tsbqb27LDNxOoPLh0gw2hIb6L/6Ow/6lIBvqcHzEKBI=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "6acb1fe5f8597d5ce63fc82bc7fcac7774b1cdf0", "rev": "a630400067c6d03c9b3e0455347dc8559db14288",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,11 +23,11 @@
}, },
"futils": { "futils": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1667395993,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -47,11 +47,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1664449551, "lastModified": 1667468181,
"narHash": "sha256-iTStJtZB1+MppkT+95Ckqy2NDaISb+QcUkOAa0DS0io=", "narHash": "sha256-806/nrDW6e7bl4/oJEdAykYz/NaBuTUi7EUYArw2oic=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "864ff685fe6443101a0a8f3950d21bcb4330e56a", "rev": "93335810751f0404fe424e61ad58bc8e94bf8e9d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -63,11 +63,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1664370076, "lastModified": 1667231093,
"narHash": "sha256-NDnIo0nxJozLwEw0VPM+RApMA90uTfbvaNNtC5eB7Os=", "narHash": "sha256-RERXruzBEBuf0c7OfZeX1hxEKB+PTCUNxWeB6C1jd8Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "854fdc68881791812eddd33b2fed94b954979a8e", "rev": "d40fea9aeb8840fea0d377baa4b38e39b9582458",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -79,11 +79,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1664475443, "lastModified": 1667490385,
"narHash": "sha256-l3Re7eo0vOwTQTcJPrXQStG4i4of2eKkdDdDG96z1ZA=", "narHash": "sha256-ySEDVzdyNWPM+eMeHu8dwkCU6Xuqmd9yE0e/VHxzd/s=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "05e2f3d002a53eeb192d5e8521c6d38f24609681", "rev": "bdd9c8ca371a9d9fb14027d66c41e71656959848",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -103,11 +103,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1663082609, "lastModified": 1667416668,
"narHash": "sha256-lmCCIu4dj59qbzkGKHQtolhpIEQMeAd2XUbXVPqgPYo=", "narHash": "sha256-FDYpOZIX7mvLJUFp2l1NbJ6RiYVy++1Hd01dxfgrF9U=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "60cad1a326df17a8c6cf2bb23436609fdd83024e", "rev": "c070b473617337f935821498e7a728c98f4c2090",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -49,19 +49,25 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.grafana = { services.grafana = {
enable = true; enable = true;
domain = "monitoring.${config.networking.domain}";
port = cfg.grafana.port;
addr = "127.0.0.1"; # Proxied through Nginx
security = { settings = {
adminUser = cfg.grafana.username; server = {
adminPasswordFile = cfg.grafana.passwordFile; domain = "monitoring.${config.networking.domain}";
root_url = "https://monitoring.${config.networking.domain}/";
http_port = cfg.grafana.port;
http_addr = "127.0.0.1"; # Proxied through Nginx
};
security = {
admin_user = cfg.grafana.username;
admin_password = "$__file{${cfg.grafana.passwordFile}}";
};
}; };
provision = { provision = {
enable = true; enable = true;
datasources = [ datasources.settings.datasources = [
{ {
name = "Prometheus"; name = "Prometheus";
type = "prometheus"; type = "prometheus";
@ -72,7 +78,7 @@ in
} }
]; ];
dashboards = [ dashboards.settings.providers = [
{ {
name = "Node Exporter"; name = "Node Exporter";
options.path = pkgs.nur.repos.alarsyo.grafanaDashboards.node-exporter; options.path = pkgs.nur.repos.alarsyo.grafanaDashboards.node-exporter;

View file

@ -405,7 +405,7 @@ in
}; };
}; };
services.grafana.provision.dashboards = lib.mkIf cfg.monitoring.enable [ services.grafana.provision.dashboards.settings.providers = lib.mkIf cfg.monitoring.enable [
{ {
name = "NGINX"; name = "NGINX";
options.path = pkgs.nur.repos.alarsyo.grafanaDashboards.nginx; options.path = pkgs.nur.repos.alarsyo.grafanaDashboards.nginx;