feat(web01): Deploy metis on calendrier.dgnum.eu
This commit is contained in:
parent
58a55c43e4
commit
1c3d44c289
4 changed files with 66 additions and 0 deletions
|
@ -12,6 +12,7 @@ let
|
||||||
|
|
||||||
# List of services to enable
|
# List of services to enable
|
||||||
enabledServices = [
|
enabledServices = [
|
||||||
|
"metis"
|
||||||
"plausible"
|
"plausible"
|
||||||
# "wordpress"
|
# "wordpress"
|
||||||
];
|
];
|
||||||
|
|
31
machines/web01/metis/default.nix
Normal file
31
machines/web01/metis/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
23
machines/web01/metis/package.nix
Normal file
23
machines/web01/metis/package.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
|
@ -41,6 +41,17 @@
|
||||||
"url": null,
|
"url": null,
|
||||||
"hash": "1bashjbh71dqs32yld7ihw2vz0vrad73pc35crf3qck8ssgpzv7d"
|
"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": {
|
"nix-lib": {
|
||||||
"type": "GitRelease",
|
"type": "GitRelease",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in a new issue