diff --git a/hosts/vm/reverseproxy/reverseproxy.nix b/hosts/vm/reverseproxy/reverseproxy.nix index ef36132..4820f84 100644 --- a/hosts/vm/reverseproxy/reverseproxy.nix +++ b/hosts/vm/reverseproxy/reverseproxy.nix @@ -1,4 +1,7 @@ -{ pkgs, ... }: +{ + pkgs, + ... +}: let formatJSON = pkgs.formats.json { }; @@ -128,6 +131,37 @@ let ]; }; + fetchFromCrans = + opts: + pkgs.fetchFromGitLab ( + { + domain = "gitlab.adm.crans.org"; + owner = "nounous"; + } + // opts + ); + + installPartySite = pkgs.python3Packages.buildPythonApplication { + name = "site-install-party"; + pyproject = false; + + src = fetchFromCrans { + repo = "site-install-party"; + rev = "master"; + hash = "sha256-KVB4m/ms0WuArrkLn05INVLqhaGxzCg30GMICI6tM5E="; + }; + + build-system = with pkgs.python3Packages; [ + mkdocs + mkdocs-material + ]; + buildPhase = '' + python3 -m mkdocs -- build -d build + ''; + installPhase = '' + mv build $out + ''; + }; in { crans = { @@ -149,7 +183,7 @@ in }; "install-party" = { anubisConfig = "${anubisChallenge}"; - serveLocalFiles = "/var/www/install-party.crans.org"; + serveLocalFiles = installPartySite; serverAliases = [ "i-p" "adopteunmanchot" @@ -184,6 +218,11 @@ in "clubs" ]; }; + "services".serveLocalFiles = fetchFromCrans { + repo = "services-page"; + rev = "master"; + hash = "sha256-ov4r6Oeta+vRcEv8bp7lFQg+2n4JTG4buetram5kN08="; + }; "snl".globalRedirect = "perso.crans.org/sonetlumens"; "wiki" = { anubisConfig = "${anubisChallenge}";