diff options
| author | Valentin <valentin@fricklerhandwerk.de> | 2025-11-06 15:41:26 +0100 |
|---|---|---|
| committer | Valentin <valentin@fricklerhandwerk.de> | 2025-11-06 16:46:28 +0100 |
| commit | 3ef375132b8e13fa7ec5a566f0ccfa27d8cda257 (patch) | |
| tree | 83cf15c68e9b5f5b63909048e80b06c588e6b276 /www/caddy.nix | |
| parent | c298e9e2ec45ddfe64fca4ed62f948dc05cde219 (diff) | |
Vereinfachte Handhabung von Ports in der virtuellen Maschine
Diffstat (limited to 'www/caddy.nix')
| -rw-r--r-- | www/caddy.nix | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/www/caddy.nix b/www/caddy.nix index 2281464..8797204 100644 --- a/www/caddy.nix +++ b/www/caddy.nix @@ -44,25 +44,21 @@ in lib, ... }: - let - httpPort = 800; - in { services.caddy.globalConfig = '' local_certs ''; services.caddy.virtualHosts = { - "http://localhost:${toString httpPort}".extraConfig = + "http://www.localhost:${toString config.virtualisation.exposedPorts.http.port}".extraConfig = config.services.caddy.virtualHosts.${self.domain}.extraConfig; }; - networking.firewall.allowedTCPPorts = [ - httpPort - ]; systemd.services.caddy.path = [ pkgs.nssTools ]; # Irrelevante Warnung unterdrücken services.getty.helpLine = lib.mkBefore '' - ${self.domain}: http://localhost:${toString (config.virtualisation.portOffset + httpPort)} + ${self.domain}: http://www.localhost:${ + with config.virtualisation; toString (portOffset + exposedPorts.http.port) + } ''; }; }; |
