From 05d7d040520a5ea9193974ee09c400ff323a0365 Mon Sep 17 00:00:00 2001 From: clerie Date: Wed, 28 Sep 2022 21:09:32 +0200 Subject: [PATCH] configuration/common: Define a global default virtual host for nginx --- configuration/common/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configuration/common/default.nix b/configuration/common/default.nix index a34321b..bb2ebbf 100644 --- a/configuration/common/default.nix +++ b/configuration/common/default.nix @@ -52,8 +52,24 @@ recommendedOptimisation = true; recommendedProxySettings = true; recommendedTlsSettings = true; + + virtualHosts = { + "default" = { + default = true; + enableACME = true; + addSSL = true; + locations."/" = { + return = ''200 "Some piece of infrastructure\n"''; + extraConfig = '' + types { } default_type "text/plain; charset=utf-8"; + ''; + }; + }; + }; }; + clerie.akne.selfSignedOnlyHostNames = [ "default" ]; + security.acme = { defaults.email = "letsencrypt@clerie.de"; acceptTerms = true;