Avoid repitition of domain names

This commit is contained in:
SebastianStork 2025-09-19 21:08:19 +02:00
parent cc211d016b
commit 39edb229af
3 changed files with 206 additions and 194 deletions

View file

@ -15,58 +15,62 @@
boot.loader.systemd-boot.enable = true;
services = {
resolved.enable = true;
tailscale = {
enable = true;
ssh.enable = true;
exitNode.enable = true;
};
syncthing = {
enable = true;
isServer = true;
doBackups = true;
deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD";
gui.domain = "syncthing.${config.custom.services.tailscale.domain}";
};
filebrowser = {
enable = true;
doBackups = true;
domain = "files.${config.custom.services.tailscale.domain}";
};
radicale = {
enable = true;
doBackups = true;
domain = "calendar.${config.custom.services.tailscale.domain}";
};
actualbudget = {
enable = true;
doBackups = true;
domain = "budget.${config.custom.services.tailscale.domain}";
};
caddy.virtualHosts =
let
inherit (config.custom) services;
in
{
syncthing-gui = {
inherit (services.syncthing.gui) domain port;
};
filebrowser = {
inherit (services.filebrowser) domain port;
};
radicale = {
inherit (services.radicale) domain port;
};
actualbudget = {
inherit (services.actualbudget) domain port;
};
services =
let
tailscaleDomain = config.custom.services.tailscale.domain;
in
{
resolved.enable = true;
tailscale = {
enable = true;
ssh.enable = true;
exitNode.enable = true;
};
};
syncthing = {
enable = true;
isServer = true;
doBackups = true;
deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD";
gui.domain = "syncthing.${tailscaleDomain}";
};
filebrowser = {
enable = true;
doBackups = true;
domain = "files.${tailscaleDomain}";
};
radicale = {
enable = true;
doBackups = true;
domain = "calendar.${tailscaleDomain}";
};
actualbudget = {
enable = true;
doBackups = true;
domain = "budget.${tailscaleDomain}";
};
caddy.virtualHosts =
let
inherit (config.custom) services;
in
{
syncthing-gui = {
inherit (services.syncthing.gui) domain port;
};
filebrowser = {
inherit (services.filebrowser) domain port;
};
radicale = {
inherit (services.radicale) domain port;
};
actualbudget = {
inherit (services.actualbudget) domain port;
};
};
};
};
}