From ff8bf3d9a92c0df04851f5a1a6d67719c89b0255 Mon Sep 17 00:00:00 2001 From: A-dead-pixel Date: Thu, 11 Jul 2024 17:14:13 +0200 Subject: [PATCH] Allow for adding more addresses for caddy server ...by adding the caddyServerAliases option to nix module. --- nix/module.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nix/module.nix b/nix/module.nix index 4254ffc52..b613b4cff 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -74,6 +74,14 @@ in ''; }; + caddyServerAliases = lib.mkOption { + default = []; + type = lib.types.listOf lib.types.str; + description = lib.mkDoc '' + Additional domains or IPs for caddy to respond at. + ''; + }; + useCaddy = lib.mkOption { default = true; description = lib.mdDoc '' @@ -327,6 +335,7 @@ in enable = true; inherit logFormat; virtualHosts."${cfg.domain}${lib.optionalString (!cfg.useSSL) ":80"}" = { + serverAliases = cfg.caddyServerAliases; logFormat = logFormat + '' output file /var/log/caddy/access-${cfg.domain}.log '';