wolf.r: grafana to seperate config
This commit is contained in:
parent
1eeccb54a2
commit
c929afa9f3
|
@ -1,7 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
shack-ip = config.krebs.build.host.nets.shack.ip4.addr;
|
shack-ip = config.krebs.build.host.nets.shack.ip4.addr;
|
||||||
influx-host = "127.0.0.1";
|
|
||||||
ext-if = "et0";
|
ext-if = "et0";
|
||||||
external-mac = "52:54:b0:0b:af:fe";
|
external-mac = "52:54:b0:0b:af:fe";
|
||||||
|
|
||||||
|
@ -56,11 +55,13 @@ in
|
||||||
<stockholm/krebs/2configs/stats/wolf-client.nix>
|
<stockholm/krebs/2configs/stats/wolf-client.nix>
|
||||||
|
|
||||||
<stockholm/krebs/2configs/shack/netbox.nix>
|
<stockholm/krebs/2configs/shack/netbox.nix>
|
||||||
|
# prometheus.shack
|
||||||
<stockholm/krebs/2configs/shack/prometheus/server.nix>
|
<stockholm/krebs/2configs/shack/prometheus/server.nix>
|
||||||
<stockholm/krebs/2configs/shack/prometheus/node.nix>
|
<stockholm/krebs/2configs/shack/prometheus/node.nix>
|
||||||
<stockholm/krebs/2configs/shack/prometheus/unifi.nix>
|
<stockholm/krebs/2configs/shack/prometheus/unifi.nix>
|
||||||
|
# grafana.shack
|
||||||
|
<stockholm/krebs/2configs/shack/grafana.nix>
|
||||||
<stockholm/krebs/2configs/collectd-base.nix> # home-assistant
|
<stockholm/krebs/2configs/collectd-base.nix> # home-assistant
|
||||||
{ services.influxdb.enable = true; }
|
|
||||||
|
|
||||||
];
|
];
|
||||||
# use your own binary cache, fallback use cache.nixos.org (which is used by
|
# use your own binary cache, fallback use cache.nixos.org (which is used by
|
||||||
|
@ -70,15 +71,6 @@ in
|
||||||
# local discovery in shackspace
|
# local discovery in shackspace
|
||||||
nixpkgs.config.packageOverrides = pkgs: { tinc = pkgs.tinc_pre; };
|
nixpkgs.config.packageOverrides = pkgs: { tinc = pkgs.tinc_pre; };
|
||||||
krebs.tinc.retiolum.extraConfig = "TCPOnly = yes";
|
krebs.tinc.retiolum.extraConfig = "TCPOnly = yes";
|
||||||
services.grafana = {
|
|
||||||
enable = true;
|
|
||||||
addr = "0.0.0.0";
|
|
||||||
users.allowSignUp = true;
|
|
||||||
users.allowOrgCreate = true;
|
|
||||||
users.autoAssignOrg = true;
|
|
||||||
auth.anonymous.enable = true;
|
|
||||||
security = import <secrets/grafana_security.nix>;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
# use the up to date prism cache
|
# use the up to date prism cache
|
||||||
|
|
19
krebs/2configs/shack/grafana.nix
Normal file
19
krebs/2configs/shack/grafana.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
let
|
||||||
|
port = 3000;
|
||||||
|
in {
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ port ]; # legacy
|
||||||
|
services.nginx.virtualHosts."grafana.shack" = {
|
||||||
|
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||||
|
};
|
||||||
|
services.grafana = {
|
||||||
|
enable = true;
|
||||||
|
port = port;
|
||||||
|
addr = "0.0.0.0";
|
||||||
|
users.allowSignUp = true;
|
||||||
|
users.allowOrgCreate = true;
|
||||||
|
users.autoAssignOrg = true;
|
||||||
|
auth.anonymous.enable = true;
|
||||||
|
security = import <secrets/grafana_security.nix>;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
|
# hostname: influx.shack
|
||||||
let
|
let
|
||||||
port = 8086;
|
port = 8086;
|
||||||
in
|
in
|
||||||
|
@ -11,7 +12,7 @@ in
|
||||||
services.influxdb = {
|
services.influxdb = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
bind-address = ":${toString port}";
|
http.bind-address = "0.0.0.0:${toString port}";
|
||||||
http.log-enabled = false;
|
http.log-enabled = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue