From 14b436f331ece3258837135d85489d334733cecb Mon Sep 17 00:00:00 2001 From: sinavir Date: Fri, 20 Oct 2023 20:10:55 +0200 Subject: [PATCH] feat(metis): Use providers from upstream --- machines/web01/metis/default.nix | 17 ++++++----------- npins/sources.json | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/machines/web01/metis/default.nix b/machines/web01/metis/default.nix index a84fc31..1517bb9 100644 --- a/machines/web01/metis/default.nix +++ b/machines/web01/metis/default.nix @@ -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 = '' diff --git a/npins/sources.json b/npins/sources.json index b5eef32..0e866b7 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -72,9 +72,9 @@ "url": "https://git.dgnum.eu/DGNum/metis" }, "branch": "master", - "revision": "b5b9941560171832b96669a6566c758c0c1a1993", + "revision": "1a151d6cf48acf9eef18f4600ebb6cce2f3b4786", "url": null, - "hash": "0zbdqlanp799saph4x91xwvwxb53d9nj42d6nlydgajnk6gmvc35" + "hash": "1anq6848vy4is8pgq5rkcmpa6kiv31lpbiw6kk030r2qn6amnqhw" }, "nix-lib": { "type": "GitRelease",