landing/default.nix

80 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2024-10-16 22:54:04 +02:00
{
sources ? import ./lon.nix,
pkgs ? import sources.nixpkgs { },
}:
2024-10-08 01:04:47 +02:00
let
description = "La Délégation Générale Numérique est une association loi 1901 domiciliée à l'ENS dont les buts sont de promouvoir la chose numérique ainsi que son usage.";
2024-10-16 22:54:04 +02:00
2024-10-08 01:04:47 +02:00
links = [
{
2024-10-16 22:54:04 +02:00
text = "État des services";
href = "https://status.dgnum.eu";
cls = "link-status";
icon = "status.svg";
2024-10-08 01:04:47 +02:00
}
{
text = "Notre site";
2024-10-16 22:54:04 +02:00
href = "https://dgnum.eu";
cls = "link-classic";
icon = "website.svg";
2024-10-08 01:04:47 +02:00
}
{
text = "Forge Git";
2024-10-16 22:54:04 +02:00
href = "https://git.dgnum.eu";
cls = "link-git";
icon = "git.svg";
2024-10-08 01:04:47 +02:00
}
{
2024-10-16 22:54:04 +02:00
text = "Mastodon";
href = "https://social.dgnum.eu/@dgnum";
cls = "link-mastodon";
icon = "mastodon.svg";
2024-10-08 01:04:47 +02:00
}
{
2024-10-16 22:54:04 +02:00
text = "Instagram";
href = "https://www.instagram.com/dgnum_eu/";
cls = "link-instagram";
icon = "instagram.svg";
2024-10-08 01:04:47 +02:00
}
{
text = "Nous contacter";
2024-10-16 22:54:04 +02:00
href = "mailto:contact@dgnum.eu";
cls = "link-classic";
icon = "contact.svg";
2024-10-08 01:04:47 +02:00
}
];
2024-10-16 22:54:04 +02:00
python3 = pkgs.python3.withPackages (ps: [
ps.watchdog
(ps.callPackage ./pkgs/moody-templates.nix { })
]);
2024-10-08 01:04:47 +02:00
in
2024-10-16 22:54:04 +02:00
{
devShell = pkgs.mkShell {
packages = [
(pkgs.callPackage "${sources.lon}/nix/packages/lon.nix" { })
python3
];
};
package = pkgs.stdenv.mkDerivation {
name = "dgnum-landing";
version = "1.0.1";
src = ./src;
buildInputs = [ python3 ];
env.DATA_FILE = pkgs.writers.writeJSON "data.json" { inherit description links; };
configurePhase = ''
export BUILD_DIR=$out
'';
buildPhase = ''
python3 build.py
'';
};
2024-10-08 01:04:47 +02:00
}