feat(web01): Deploy metis on calendrier.dgnum.eu

This commit is contained in:
Tom Hubrecht 2023-09-25 00:40:47 +02:00
parent 58a55c43e4
commit 1c3d44c289
4 changed files with 66 additions and 0 deletions

View file

@ -12,6 +12,7 @@ let
# List of services to enable
enabledServices = [
"metis"
"plausible"
# "wordpress"
];

View file

@ -0,0 +1,31 @@
{ lib, pkgs, sources, ... }:
let
host = "calendrier.dgnum.eu";
package = pkgs.callPackage ./package.nix { src = sources.metis; };
providers = {
klub-reseau = "nuage.beta.rz.ens.wtf";
eleves-ens = "cloud.eleves.ens.fr";
frama-agenda = "framagenda.org";
};
in {
services.nginx.virtualHosts.${host} = {
enableACME = true;
forceSSL = true;
root = package;
locations = lib.mapAttrs' (name: attrs:
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/;
'';
}) providers;
};
}

View file

@ -0,0 +1,23 @@
{ lib, fetchgit, buildNpmPackage, src }:
buildNpmPackage {
pname = "metis";
version = "unstable";
inherit src;
npmDepsHash = "sha256-RbjWNVY8KlPP9ajQRnrsWhOZiiyyMGQSY39lmZnTC1I=";
installPhase = ''
cp -r public $out
'';
meta = with lib; {
description = "";
homepage = "https://git.dgnum.eu/DGNum/metis";
license = licenses.unfree; # FIXME: nix-init did not found a license
maintainers = with maintainers; [ thubrecht ];
mainProgram = "metis";
platforms = platforms.all;
};
}

View file

@ -41,6 +41,17 @@
"url": null,
"hash": "1bashjbh71dqs32yld7ihw2vz0vrad73pc35crf3qck8ssgpzv7d"
},
"metis": {
"type": "Git",
"repository": {
"type": "Git",
"url": "https://git.dgnum.eu/DGNum/metis"
},
"branch": "master",
"revision": "f086aab2bf940035acab3ea6c3c15ebd966ebe8c",
"url": null,
"hash": "0inivyfsq86bwsfqcrflj9mkx1lcsn0g2y2lpk03ibh417jxq1vx"
},
"nix-lib": {
"type": "GitRelease",
"repository": {