some hostnames

This commit is contained in:
nora 2025-08-04 21:51:46 +02:00
parent 33a7017375
commit 9121101308
4 changed files with 12 additions and 9 deletions

View file

@ -6,6 +6,10 @@ in
{
deployment.targetHost = "${name}.infra.noratrieb.dev";
networking.hosts = {
"${networkingConfig.vps3.wg.privateIP}" = [ "loki.internal" "pyroscope.internal" "prometheus.internal" ];
};
imports = [
"${builtins.fetchTarball "https://github.com/ryantm/agenix/archive/de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6.tar.gz"}/modules/age.nix" # main 2024-07-26
];
@ -126,7 +130,7 @@ in
};
clients = [
{
url = "http://vps3.local:3100/loki/api/v1/push";
url = "http://loki.internal:3100/loki/api/v1/push";
}
];
scrape_configs = [
@ -217,7 +221,7 @@ in
pyroscope.write "endpoint" {
endpoint {
url = "http://vps3.local:4040"
url = "http://pyroscope.internal:4040"
}
external_labels = {
"instance" = env("HOSTNAME"),

View file

@ -35,12 +35,12 @@ in
s3_api = {
s3_region = "garage";
api_bind_addr = "[::]:3900";
root_domain = ".s3.garage.localhost";
root_domain = ".s3.garage.internal";
};
s3_web = {
bind_addr = "[::]:3902";
root_domain = ".web.garage.localhost";
root_domain = ".web.garage.internal";
index = "index.html";
};

View file

@ -18,7 +18,6 @@
{
job_name = "cadvisor";
static_configs = [{ targets = map (name: "${name}.local:8080") (builtins.attrNames networkingConfig); }];
}
{
job_name = "systemd";
@ -71,7 +70,7 @@
name = "Prometheus";
type = "prometheus";
access = "proxy";
url = "http://vps3.local:9090";
url = "http://prometheus.internal:9090";
jsonData = {
httpMethod = "POST";
prometheusType = "Prometheus";
@ -81,13 +80,13 @@
name = "loki";
type = "loki";
access = "proxy";
url = "http://vps3.local:3100";
url = "http://loki.internal:3100";
}
{
name = "pyroscope";
type = "grafana-pyroscope-datasource";
access = "proxy";
url = "http://vps3.local:4040";
url = "http://pyroscope.internal:4040";
}
];
};

View file

@ -9,7 +9,7 @@ in
let
hostsEntries = map
(host:
let hostConfig = builtins.getAttr host networkingConfig; in
let hostConfig = networkingConfig."${host}"; in
if builtins.hasAttr "wg" hostConfig then {
name = hostConfig.wg.privateIP;
value = [ "${host}.local" ];