mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 08:45:02 +01:00
some hostnames
This commit is contained in:
parent
33a7017375
commit
9121101308
4 changed files with 12 additions and 9 deletions
|
|
@ -6,6 +6,10 @@ in
|
||||||
{
|
{
|
||||||
deployment.targetHost = "${name}.infra.noratrieb.dev";
|
deployment.targetHost = "${name}.infra.noratrieb.dev";
|
||||||
|
|
||||||
|
networking.hosts = {
|
||||||
|
"${networkingConfig.vps3.wg.privateIP}" = [ "loki.internal" "pyroscope.internal" "prometheus.internal" ];
|
||||||
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
"${builtins.fetchTarball "https://github.com/ryantm/agenix/archive/de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6.tar.gz"}/modules/age.nix" # main 2024-07-26
|
"${builtins.fetchTarball "https://github.com/ryantm/agenix/archive/de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6.tar.gz"}/modules/age.nix" # main 2024-07-26
|
||||||
];
|
];
|
||||||
|
|
@ -126,7 +130,7 @@ in
|
||||||
};
|
};
|
||||||
clients = [
|
clients = [
|
||||||
{
|
{
|
||||||
url = "http://vps3.local:3100/loki/api/v1/push";
|
url = "http://loki.internal:3100/loki/api/v1/push";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
scrape_configs = [
|
scrape_configs = [
|
||||||
|
|
@ -217,7 +221,7 @@ in
|
||||||
|
|
||||||
pyroscope.write "endpoint" {
|
pyroscope.write "endpoint" {
|
||||||
endpoint {
|
endpoint {
|
||||||
url = "http://vps3.local:4040"
|
url = "http://pyroscope.internal:4040"
|
||||||
}
|
}
|
||||||
external_labels = {
|
external_labels = {
|
||||||
"instance" = env("HOSTNAME"),
|
"instance" = env("HOSTNAME"),
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,12 @@ in
|
||||||
s3_api = {
|
s3_api = {
|
||||||
s3_region = "garage";
|
s3_region = "garage";
|
||||||
api_bind_addr = "[::]:3900";
|
api_bind_addr = "[::]:3900";
|
||||||
root_domain = ".s3.garage.localhost";
|
root_domain = ".s3.garage.internal";
|
||||||
};
|
};
|
||||||
|
|
||||||
s3_web = {
|
s3_web = {
|
||||||
bind_addr = "[::]:3902";
|
bind_addr = "[::]:3902";
|
||||||
root_domain = ".web.garage.localhost";
|
root_domain = ".web.garage.internal";
|
||||||
index = "index.html";
|
index = "index.html";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
{
|
{
|
||||||
job_name = "cadvisor";
|
job_name = "cadvisor";
|
||||||
static_configs = [{ targets = map (name: "${name}.local:8080") (builtins.attrNames networkingConfig); }];
|
static_configs = [{ targets = map (name: "${name}.local:8080") (builtins.attrNames networkingConfig); }];
|
||||||
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
job_name = "systemd";
|
job_name = "systemd";
|
||||||
|
|
@ -71,7 +70,7 @@
|
||||||
name = "Prometheus";
|
name = "Prometheus";
|
||||||
type = "prometheus";
|
type = "prometheus";
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://vps3.local:9090";
|
url = "http://prometheus.internal:9090";
|
||||||
jsonData = {
|
jsonData = {
|
||||||
httpMethod = "POST";
|
httpMethod = "POST";
|
||||||
prometheusType = "Prometheus";
|
prometheusType = "Prometheus";
|
||||||
|
|
@ -81,13 +80,13 @@
|
||||||
name = "loki";
|
name = "loki";
|
||||||
type = "loki";
|
type = "loki";
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://vps3.local:3100";
|
url = "http://loki.internal:3100";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "pyroscope";
|
name = "pyroscope";
|
||||||
type = "grafana-pyroscope-datasource";
|
type = "grafana-pyroscope-datasource";
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://vps3.local:4040";
|
url = "http://pyroscope.internal:4040";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ in
|
||||||
let
|
let
|
||||||
hostsEntries = map
|
hostsEntries = map
|
||||||
(host:
|
(host:
|
||||||
let hostConfig = builtins.getAttr host networkingConfig; in
|
let hostConfig = networkingConfig."${host}"; in
|
||||||
if builtins.hasAttr "wg" hostConfig then {
|
if builtins.hasAttr "wg" hostConfig then {
|
||||||
name = hostConfig.wg.privateIP;
|
name = hostConfig.wg.privateIP;
|
||||||
value = [ "${host}.local" ];
|
value = [ "${host}.local" ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue