diff --git a/hosts/alt/caddy.nix b/hosts/alt/caddy.nix index 6aef62f..667c36f 100644 --- a/hosts/alt/caddy.nix +++ b/hosts/alt/caddy.nix @@ -15,24 +15,25 @@ let "ha.figtree.dev" = "http://192.168.1.50:8123"; # "budget.figtree.dev" = "http://192.168.80.1:5006"; - # .box domains now automatically get "tls internal" - "home.box" = "http://192.168.1.63:3000"; - "budget.box" = "http://192.168.80.1:5006"; - "torrent.box" = "http://192.168.1.65:8080"; - "books.box" = "http://192.168.80.4:8010"; + # .lan domains now automatically get "tls internal" + "home.lan" = "http://192.168.1.63:3000"; + "budget.lan" = "http://192.168.80.1:5006"; + "torrent.lan" = "http://192.168.1.65:8080"; + "books.lan" = "http://192.168.80.4:8010"; + "recipes.lan" = "http://192.168.80.4:8222"; }; # Normalize sites: # 1. Turn strings into { backend = "..."; }. - # 2. Automatically prepend `tls internal` for any domain ending in .box. + # 2. Automatically prepend `tls internal` for any domain ending in .lan. normalizedSites = lib.mapAttrs (domain: siteConfig: let # Ensure siteConfig is an attrset. baseConfig = if lib.isString siteConfig then { backend = siteConfig; } else siteConfig; - # Check if it's a .box domain. - isBoxDomain = lib.hasSuffix ".box" domain; + # Check if it's a .lan domain. + isLanDomain = lib.hasSuffix ".lan" domain; in - if isBoxDomain then + if isLanDomain then baseConfig // { extraBefore = '' tls internal