feat(static): Refactor www-eleves config
All checks were successful
build configuration / build_vault01 (push) Successful in 51s
build configuration / build_storage01 (push) Successful in 52s
build configuration / build_web02 (push) Successful in 1m0s
build configuration / build_web01 (push) Successful in 1m9s
build configuration / build_compute01 (push) Successful in 1m14s
ds-fr update / npins_update (push) Successful in 1m50s
npins update / npins_update (push) Successful in 1m8s
All checks were successful
build configuration / build_vault01 (push) Successful in 51s
build configuration / build_storage01 (push) Successful in 52s
build configuration / build_web02 (push) Successful in 1m0s
build configuration / build_web01 (push) Successful in 1m9s
build configuration / build_compute01 (push) Successful in 1m14s
ds-fr update / npins_update (push) Successful in 1m50s
npins update / npins_update (push) Successful in 1m8s
This commit is contained in:
parent
4359447596
commit
95fd21c378
5 changed files with 23 additions and 34 deletions
|
@ -1,13 +1,21 @@
|
|||
_:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) recursiveUpdate;
|
||||
websites = import ./npins;
|
||||
|
||||
mkVhost = name:
|
||||
{ outPath, ... }: {
|
||||
mkVhost =
|
||||
name:
|
||||
{ outPath, ... }:
|
||||
{
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "${outPath}/www";
|
||||
};
|
||||
in
|
||||
|
||||
in { services.nginx.virtualHosts = builtins.mapAttrs mkVhost websites; }
|
||||
{
|
||||
services.nginx.virtualHosts = recursiveUpdate (builtins.mapAttrs mkVhost websites) {
|
||||
"eleves.dgnum.eu".locations."/".tryFiles = "$uri $uri/index.html /fr/$uri /en/$uri /fr/index.html";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue