2024-12-12 14:41:43 +01:00
|
|
|
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
2024-03-16 16:17:02 +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 =
|
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
|
|
|
|
2024-02-14 11:15:46 +01:00
|
|
|
"retired.dgnum.eu".locations."/".tryFiles = "/index.html =404";
|
2024-01-25 17:19:16 +01:00
|
|
|
};
|
|
|
|
}
|