2024-02-06 20:43:46 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
sources,
|
|
|
|
...
|
|
|
|
}:
|
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 =
|
2024-02-02 10:55:35 +01:00
|
|
|
_:
|
2024-01-25 17:19:16 +01:00
|
|
|
{ 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";
|
2024-02-06 20:43:46 +01:00
|
|
|
|
|
|
|
"simi.normalesup.eu" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
root = (import sources.simiweb { inherit pkgs; }).site;
|
|
|
|
};
|
2024-01-25 17:19:16 +01:00
|
|
|
};
|
|
|
|
}
|