forked from DGNum/infrastructure
feat(static): Refactor www-eleves config
This commit is contained in:
parent
4359447596
commit
95fd21c378
5 changed files with 23 additions and 34 deletions
|
@ -11,7 +11,6 @@ lib.extra.mkConfig {
|
|||
# List of services to enable
|
||||
"castopod"
|
||||
"crabfit"
|
||||
"eleves"
|
||||
"linkal"
|
||||
"matterbridge"
|
||||
"metis"
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
{ sources, ... }:
|
||||
|
||||
let
|
||||
host = "eleves.dgnum.eu";
|
||||
serverAliases = [ ];
|
||||
in {
|
||||
services.nginx.virtualHosts.${host} = {
|
||||
inherit serverAliases;
|
||||
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "${sources.www-eleves.outPath}/www";
|
||||
|
||||
locations."/" = {
|
||||
tryFiles = "$uri $uri/index.html /fr/$uri /en/$uri /fr/index.html";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,6 +11,17 @@
|
|||
"url": null,
|
||||
"hash": "0x1iyq52awazxyhsx07qv5slgwym0k3gkhbnfflqcn2jmwkir0yr"
|
||||
},
|
||||
"eleves.dgnum.eu": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "Git",
|
||||
"url": "https://git.dgnum.eu/DGNum/eleves.dgnum.eu.git"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "d28526a8cdbd1cce13071b50064fd8d4deadb1f5",
|
||||
"url": null,
|
||||
"hash": "0cdrywjwvh6sg8rlsm3ap2prksbizvdjbsmqdpdmnjs06ccxnl8c"
|
||||
},
|
||||
"interq.ens.fr": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
|
@ -142,17 +142,6 @@
|
|||
"revision": "e5a17243cd3e684a7e67a91342fb7d11479c46b6",
|
||||
"url": "https://git.helsinki.tools/api/v4/projects/helsinki-systems%2Fwp4nix/repository/archive.tar.gz?sha=e5a17243cd3e684a7e67a91342fb7d11479c46b6",
|
||||
"hash": "168jl60kn7134ipilkm2skdaisxsyv3jkcpg485xl8n4zdv8gz8k"
|
||||
},
|
||||
"www-eleves": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "Git",
|
||||
"url": "https://git.dgnum.eu/DGNum/www.eleves.ens.fr.git"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "d28526a8cdbd1cce13071b50064fd8d4deadb1f5",
|
||||
"url": null,
|
||||
"hash": "0cdrywjwvh6sg8rlsm3ap2prksbizvdjbsmqdpdmnjs06ccxnl8c"
|
||||
}
|
||||
},
|
||||
"version": 3
|
||||
|
|
Loading…
Reference in a new issue