# SPDX-FileCopyrightText: 2024 Tom Hubrecht # # SPDX-License-Identifier: EUPL-1.2 { lib, ... }: let inherit (lib) recursiveUpdate; websites = import ./npins; mkVhost = _: { outPath, ... }: { enableACME = true; forceSSL = true; root = "${outPath}/www"; }; in { services.nginx.virtualHosts = recursiveUpdate (builtins.mapAttrs mkVhost websites) { "eleves.dgnum.eu".locations."/".tryFiles = "$uri $uri/index.html /fr/$uri /en/$uri /fr/index.html"; "retired.dgnum.eu".locations."/".tryFiles = "/index.html =404"; }; }