forked from DGNum/infrastructure
Tom Hubrecht
ecbad0a638
This adds subdirectories for the different types of systems, for the modules and the machines
23 lines
488 B
Nix
23 lines
488 B
Nix
{ lib, ... }:
|
|
|
|
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";
|
|
};
|
|
}
|