infrastructure/machines/web01/static/default.nix

22 lines
422 B
Nix
Raw Normal View History

{ lib, ... }:
let
inherit (lib) recursiveUpdate;
websites = import ./npins;
mkVhost =
name:
{ outPath, ... }:
{
2024-01-06 10:28:02 +01:00
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";
};
}