diff options
author | Emile <git@emile.space> | 2024-03-26 10:30:12 +0100 |
---|---|---|
committer | Emile <git@emile.space> | 2024-03-26 10:32:37 +0100 |
commit | cb20d078360ec9235b9b3a78d7950ded1f601267 (patch) | |
tree | 52d5ab591c843d9a7e888369f8315410c86e2203 /nix/hosts/corrino/www/grafana.emile.space.nix | |
parent | dfed6d17ebc3494fc783b7a345b342d59e4e325a (diff) |
ports.nix file containing the used ports in a central location
Done and deployed in the 15min train ride to the office, quick and easy!
Diffstat (limited to 'nix/hosts/corrino/www/grafana.emile.space.nix')
-rw-r--r-- | nix/hosts/corrino/www/grafana.emile.space.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/nix/hosts/corrino/www/grafana.emile.space.nix b/nix/hosts/corrino/www/grafana.emile.space.nix index 0f73147..d3e0e2f 100644 --- a/nix/hosts/corrino/www/grafana.emile.space.nix +++ b/nix/hosts/corrino/www/grafana.emile.space.nix @@ -1,6 +1,8 @@ { config, ... }: -{ +let + ports = import ../ports.nix; +in { services = { nginx.virtualHosts."grafana.emile.space" = { addSSL = true; @@ -16,7 +18,7 @@ settings = { server = { http_addr = "127.0.0.1"; - http_port = 3002; + http_port = ports.grafana; domain = "grafana.emile.space"; root_url = "https://grafana.emile.space/"; }; @@ -47,13 +49,13 @@ prometheus = { enable = true; retentionTime = "356d"; - port = 9003; + port = ports.prometheus; exporters = { node = { enable = true; enabledCollectors = [ "systemd" ]; - port = 9002; + port = ports.prometheus_node_exporter; }; }; scrapeConfigs = [ @@ -71,7 +73,7 @@ configuration = { auth_enabled = false; server = { - http_listen_port = 9004; + http_listen_port = ports.loki; }; limits_config = { @@ -112,7 +114,7 @@ enable = true; configuration = { server = { - http_listen_port = 9005; + http_listen_port = ports.promtail; grpc_listen_port = 0; }; positions.filename = "/tmp/positions.yml"; @@ -214,4 +216,4 @@ }; }; }; -} \ No newline at end of file +} |