forked from DGNum/infrastructure
feat(metis): Use providers from upstream
This commit is contained in:
parent
6476bd9adb
commit
14b436f331
2 changed files with 8 additions and 13 deletions
|
@ -1,13 +1,10 @@
|
|||
{ lib, pkgs, sources, ... }:
|
||||
|
||||
let
|
||||
package = (import sources.metis { inherit pkgs; }).production;
|
||||
metis = import sources.metis { inherit pkgs; };
|
||||
package = metis.production;
|
||||
inherit (metis) providers;
|
||||
|
||||
providers = {
|
||||
klub-reseau = "nuage.beta.rz.ens.wtf";
|
||||
eleves-ens = "cloud.eleves.ens.fr";
|
||||
frama-agenda = "framagenda.org";
|
||||
};
|
||||
|
||||
|
||||
in {
|
||||
|
@ -19,16 +16,14 @@ in {
|
|||
forceSSL = true;
|
||||
root = package;
|
||||
|
||||
locations = lib.mapAttrs' (name: attrs:
|
||||
locations = lib.mapAttrs' (name: value:
|
||||
lib.nameValuePair "/cal/${name}/" {
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass https://${
|
||||
providers.${name}
|
||||
}/remote.php/dav/public-calendars/;
|
||||
'';
|
||||
proxy_pass ${value};
|
||||
'';
|
||||
}) providers;
|
||||
|
||||
extraConfig = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue