Package static sites

hachino-test
Pyjacpp 2026-07-12 14:00:47 +02:00
parent b90e461f45
commit 9222bf3d29
No known key found for this signature in database
GPG Key ID: ED479A5A26930939
1 changed files with 41 additions and 2 deletions

View File

@ -1,4 +1,7 @@
{ pkgs, ... }: {
pkgs,
...
}:
let let
formatJSON = pkgs.formats.json { }; 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 in
{ {
crans = { crans = {
@ -149,7 +183,7 @@ in
}; };
"install-party" = { "install-party" = {
anubisConfig = "${anubisChallenge}"; anubisConfig = "${anubisChallenge}";
serveLocalFiles = "/var/www/install-party.crans.org"; serveLocalFiles = installPartySite;
serverAliases = [ serverAliases = [
"i-p" "i-p"
"adopteunmanchot" "adopteunmanchot"
@ -184,6 +218,11 @@ in
"clubs" "clubs"
]; ];
}; };
"services".serveLocalFiles = fetchFromCrans {
repo = "services-page";
rev = "master";
hash = "sha256-ov4r6Oeta+vRcEv8bp7lFQg+2n4JTG4buetram5kN08=";
};
"snl".globalRedirect = "perso.crans.org/sonetlumens"; "snl".globalRedirect = "perso.crans.org/sonetlumens";
"wiki" = { "wiki" = {
anubisConfig = "${anubisChallenge}"; anubisConfig = "${anubisChallenge}";