mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-03 19:42:10 +02:00
Server update
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
35
server-modules/mazanoke.nix
Normal file
35
server-modules/mazanoke.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{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";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user