2024-01-25 17:19:16 +01:00
|
|
|
{ lib, ... }:
|
2024-01-05 17:21:40 +01:00
|
|
|
|
|
|
|
let
|
2024-01-25 17:19:16 +01:00
|
|
|
inherit (lib) recursiveUpdate;
|
2024-01-05 17:21:40 +01:00
|
|
|
websites = import ./npins;
|
|
|
|
|
2024-01-25 17:19:16 +01:00
|
|
|
mkVhost =
|
|
|
|
name:
|
|
|
|
{ outPath, ... }:
|
|
|
|
{
|
2024-01-06 10:28:02 +01:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2024-01-05 17:21:40 +01:00
|
|
|
root = "${outPath}/www";
|
|
|
|
};
|
2024-01-25 17:19:16 +01:00
|
|
|
in
|
2024-01-05 17:21:40 +01:00
|
|
|
|
2024-01-25 17:19:16 +01:00
|
|
|
{
|
|
|
|
services.nginx.virtualHosts = recursiveUpdate (builtins.mapAttrs mkVhost websites) {
|
|
|
|
"eleves.dgnum.eu".locations."/".tryFiles = "$uri $uri/index.html /fr/$uri /en/$uri /fr/index.html";
|
|
|
|
};
|
|
|
|
}
|