mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-29 15:20:53 +01:00
Using upstream uptime-kuma
This commit is contained in:
parent
9f58456ef5
commit
acdd836be3
4 changed files with 0 additions and 59 deletions
|
@ -68,7 +68,6 @@ in
|
||||||
tailscale = prev.unstable.tailscale;
|
tailscale = prev.unstable.tailscale;
|
||||||
nodePackages = prev.unstable.nodePackages;
|
nodePackages = prev.unstable.nodePackages;
|
||||||
hydrasect = prev.pkgs.callPackage ../packages/hydrasect { };
|
hydrasect = prev.pkgs.callPackage ../packages/hydrasect { };
|
||||||
uptime-kuma = prev.pkgs.callPackage ../packages/uptime-kuma { };
|
|
||||||
linkal = inputs.linkal.defaultPackage."${system}";
|
linkal = inputs.linkal.defaultPackage."${system}";
|
||||||
mosh = prev.unstable.mosh;
|
mosh = prev.unstable.mosh;
|
||||||
hyprpaper = inputs.hyprpaper.packages.${system}.default;
|
hyprpaper = inputs.hyprpaper.packages.${system}.default;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
legacy-peer-deps=true
|
|
|
@ -1,45 +0,0 @@
|
||||||
{ pkgs, lib, fetchFromGitHub, buildNpmPackage, python3, nodejs, nixosTests }:
|
|
||||||
|
|
||||||
buildNpmPackage rec {
|
|
||||||
pname = "uptime-kuma";
|
|
||||||
version = "1.21.2";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "louislam";
|
|
||||||
repo = "uptime-kuma";
|
|
||||||
rev = version;
|
|
||||||
sha256 = "sha256-Xu5mTerhLjOMnLXhjCdnw4yaznfta3h3D9VGk12JziE=";
|
|
||||||
};
|
|
||||||
|
|
||||||
npmDepsHash = "sha256-J00sLDfUOIy/ZJTqKrMY1dAyE3HY9Cqm9vTEm2lmLoY=";
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Fixes the permissions of the database being not set correctly
|
|
||||||
# See https://github.com/louislam/uptime-kuma/pull/2119
|
|
||||||
./fix-database-permissions.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 ];
|
|
||||||
|
|
||||||
CYPRESS_INSTALL_BINARY = 0; # Stops Cypress from trying to download binaries
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
cp -r dist $out/lib/node_modules/uptime-kuma/
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
|
||||||
makeWrapper ${nodejs}/bin/node $out/bin/uptime-kuma-server \
|
|
||||||
--add-flags $out/lib/node_modules/uptime-kuma/server/server.js \
|
|
||||||
--chdir $out/lib/node_modules/uptime-kuma
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.uptime-kuma = nixosTests.uptime-kuma;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A fancy self-hosted monitoring tool";
|
|
||||||
homepage = "https://github.com/louislam/uptime-kuma";
|
|
||||||
changelog = "https://github.com/louislam/uptime-kuma/releases/tag/${version}";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ julienmalka ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/server/server.js b/server/server.js
|
|
||||||
index 0c9a45e6..cec31c7c 100644
|
|
||||||
--- a/server/server.js
|
|
||||||
+++ b/server/server.js
|
|
||||||
@@ -1583,6 +1583,7 @@ async function initDatabase(testMode = false) {
|
|
||||||
if (! fs.existsSync(Database.path)) {
|
|
||||||
log.info("server", "Copying Database");
|
|
||||||
fs.copyFileSync(Database.templatePath, Database.path);
|
|
||||||
+ fs.chmodSync(Database.path, 0o640);
|
|
||||||
}
|
|
||||||
|
|
||||||
log.info("server", "Connecting to the Database");
|
|
Loading…
Add table
Reference in a new issue