Tom Hubrecht
054f98fc34
All checks were successful
lint / check (push) Successful in 24s
build configuration / build_vault01 (push) Successful in 1m1s
build configuration / build_web02 (push) Successful in 59s
build configuration / build_compute01 (push) Successful in 1m7s
build configuration / build_storage01 (push) Successful in 1m16s
build configuration / build_web01 (push) Successful in 1m26s
npins update / npins_update (push) Successful in 1m24s
ds-fr update / npins_update (push) Successful in 1m58s
34 lines
658 B
Nix
34 lines
658 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
sources,
|
|
...
|
|
}:
|
|
|
|
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";
|
|
|
|
"simi.normalesup.eu" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
root = (import sources.simiweb { inherit pkgs; }).site;
|
|
};
|
|
};
|
|
}
|