Files
nixy/server-modules/mazanoke.nix
2026-01-06 17:24:21 +01:00

36 lines
995 B
Nix

{pkgs, ...}: let
version = "1.1.5"; # Ajuste la version si nécessaire
mazanoke-pkg = pkgs.stdenv.mkDerivation {
inherit version;
pname = "mazanoke";
src = pkgs.fetchFromGitHub {
owner = "civilblur";
repo = "mazanoke";
rev = "v${version}";
hash = "sha256-B/AF4diMNxN94BzpZP/C+K8kNj9q+4SDKWa/qd4LrVU=";
};
# On utilise installPhase pour copier les fichiers vers $out
installPhase = ''
mkdir -p $out/share/mazanoke
cp -r ./index.html ./favicon.ico ./manifest.json ./service-worker.js ./assets $out/share/mazanoke/
'';
};
in {
services = {
nginx.virtualHosts."mazanoke.local" = {
root = "${mazanoke-pkg}/share/mazanoke";
locations."/" = {
index = "index.html";
};
listen = [
{
addr = "127.0.0.1";
port = 8755;
}
];
};
cloudflared.tunnels."f7c8f777-a36c-4b9a-b6e3-6a112bd43e73".ingress."mazanoke.hadi.diy" = "http://localhost:8755";
};
}