mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Avoid repitition of domain names
This commit is contained in:
parent
cc211d016b
commit
39edb229af
3 changed files with 206 additions and 194 deletions
|
|
@ -17,66 +17,70 @@
|
|||
|
||||
boot.loader.grub.enable = true;
|
||||
|
||||
services = {
|
||||
resolved.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
|
||||
gatus = {
|
||||
enable = true;
|
||||
domain = "status.${config.custom.services.tailscale.domain}";
|
||||
domainsToMonitor = config.meta.domains.globalList;
|
||||
endpoints = {
|
||||
"alerts" = {
|
||||
group = "Monitoring";
|
||||
path = "/v1/health";
|
||||
extraConditions = [ "[BODY].healthy == true" ];
|
||||
};
|
||||
"grafana".group = "Monitoring";
|
||||
"logs".group = "Monitoring";
|
||||
"git ssh" = {
|
||||
protocol = "ssh";
|
||||
domain = "git.sstork.dev";
|
||||
};
|
||||
"speedtest".protocol = "http";
|
||||
services =
|
||||
let
|
||||
tailscaleDomain = config.custom.services.tailscale.domain;
|
||||
in
|
||||
{
|
||||
resolved.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
ntfy = {
|
||||
enable = true;
|
||||
domain = "alerts.${config.custom.services.tailscale.domain}";
|
||||
};
|
||||
|
||||
grafana = {
|
||||
enable = true;
|
||||
domain = "grafana.${config.custom.services.tailscale.domain}";
|
||||
};
|
||||
|
||||
victorialogs = {
|
||||
enable = true;
|
||||
domain = "logs.${config.custom.services.tailscale.domain}";
|
||||
};
|
||||
|
||||
caddy.virtualHosts =
|
||||
let
|
||||
inherit (config.custom) services;
|
||||
in
|
||||
{
|
||||
gatus = {
|
||||
inherit (services.gatus) domain port;
|
||||
};
|
||||
ntfy = {
|
||||
inherit (services.ntfy) domain port;
|
||||
};
|
||||
grafana = {
|
||||
inherit (services.grafana) domain port;
|
||||
};
|
||||
victorialogs = {
|
||||
inherit (services.victorialogs) domain port;
|
||||
gatus = {
|
||||
enable = true;
|
||||
domain = "status.${tailscaleDomain}";
|
||||
domainsToMonitor = config.meta.domains.globalList;
|
||||
endpoints = {
|
||||
"alerts" = {
|
||||
group = "Monitoring";
|
||||
path = "/v1/health";
|
||||
extraConditions = [ "[BODY].healthy == true" ];
|
||||
};
|
||||
"grafana".group = "Monitoring";
|
||||
"logs".group = "Monitoring";
|
||||
"git ssh" = {
|
||||
protocol = "ssh";
|
||||
domain = "git.sstork.dev";
|
||||
};
|
||||
"speedtest".protocol = "http";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ntfy = {
|
||||
enable = true;
|
||||
domain = "alerts.${tailscaleDomain}";
|
||||
};
|
||||
|
||||
grafana = {
|
||||
enable = true;
|
||||
domain = "grafana.${tailscaleDomain}";
|
||||
};
|
||||
|
||||
victorialogs = {
|
||||
enable = true;
|
||||
domain = "logs.${tailscaleDomain}";
|
||||
};
|
||||
|
||||
caddy.virtualHosts =
|
||||
let
|
||||
inherit (config.custom) services;
|
||||
in
|
||||
{
|
||||
gatus = {
|
||||
inherit (services.gatus) domain port;
|
||||
};
|
||||
ntfy = {
|
||||
inherit (services.ntfy) domain port;
|
||||
};
|
||||
grafana = {
|
||||
inherit (services.grafana) domain port;
|
||||
};
|
||||
victorialogs = {
|
||||
inherit (services.victorialogs) domain port;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue