Use hosts.nix instead of hardcoded value

This commit is contained in:
= 2025-02-03 07:19:08 +01:00
parent 6a99c25bdb
commit f1eefafa3a

View file

@ -2,6 +2,7 @@
config, config,
pkgs, pkgs,
lib, lib,
inputs,
... ...
}: }:
let let
@ -9,6 +10,7 @@ let
publicDomain = "pasetto.me"; publicDomain = "pasetto.me";
tsDomain = "tegola.pro"; tsDomain = "tegola.pro";
email = "pasettodavide@gmail.com"; email = "pasettodavide@gmail.com";
hosts = import ../hosts.nix;
in in
{ {
@ -39,13 +41,22 @@ in
services = { services = {
authentik = {
enable = true;
proxy = {
enable = true;
domain = tsDomain;
host = hosts.authentik;
};
};
dashy = { dashy = {
enable = true; enable = true;
settings = import ./dashy-settings.nix; settings = import ./dashy-settings.nix;
proxy = { proxy = {
enable = true; enable = true;
domain = publicDomain; domain = publicDomain;
host = "caddy.internal"; host = hosts.caddy;
}; };
}; };
@ -53,7 +64,7 @@ in
proxy = { proxy = {
enable = true; enable = true;
domain = tsDomain; domain = tsDomain;
host = "arr.internal"; host = hosts.arr;
}; };
}; };
@ -61,7 +72,7 @@ in
proxy = { proxy = {
enable = true; enable = true;
domain = publicDomain; domain = publicDomain;
host = "nextcloud.internal"; host = hosts.nextcloud;
}; };
}; };
@ -69,11 +80,11 @@ in
enable = true; enable = true;
secretFile = config.age.secrets.searx-secret.path; secretFile = config.age.secrets.searx-secret.path;
enableAI = true; enableAI = true;
perplexicaUrl = "portainer.internal"; perplexicaUrl = hosts.portainer;
proxy = { proxy = {
enable = true; enable = true;
domain = tsDomain; domain = tsDomain;
host = "caddy.internal"; host = hosts.caddy;
}; };
}; };
@ -81,7 +92,7 @@ in
proxy = { proxy = {
enable = true; enable = true;
domain = publicDomain; domain = publicDomain;
host = "vaultwarden.internal"; host = hosts.vaultwarden;
}; };
}; };
@ -92,7 +103,7 @@ in
proxy = { proxy = {
enable = true; enable = true;
domain = tsDomain; domain = tsDomain;
host = "metrics.internal"; host = hosts.metrics;
}; };
}; };
@ -100,7 +111,7 @@ in
proxy = { proxy = {
enable = true; enable = true;
domain = tsDomain; domain = tsDomain;
host = "metrics.internal"; host = hosts.metrics;
}; };
}; };
}; };