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

View file

@ -49,19 +49,25 @@ in
config = lib.mkIf cfg.enable {
services.grafana = {
enable = true;
domain = "monitoring.${config.networking.domain}";
port = cfg.grafana.port;
addr = "127.0.0.1"; # Proxied through Nginx
security = {
adminUser = cfg.grafana.username;
adminPasswordFile = cfg.grafana.passwordFile;
settings = {
server = {
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 = {
enable = true;
datasources = [
datasources.settings.datasources = [
{
name = "Prometheus";
type = "prometheus";
@ -72,7 +78,7 @@ in
}
];
dashboards = [
dashboards.settings.providers = [
{
name = "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";
options.path = pkgs.nur.repos.alarsyo.grafanaDashboards.nginx;