mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-31 17:20:53 +02:00
Compare commits
No commits in common. "f3001378ad2a2cffbbbf875679657725a4683e12" and "bff13e5ba9bdf7f32c27561f887641b7390bc793" have entirely different histories.
f3001378ad
...
bff13e5ba9
7 changed files with 60 additions and 66 deletions
|
@ -37,6 +37,7 @@ import "${nixpkgs}/nixos/lib/eval-config.nix" {
|
||||||
(import "${inputs.impermanence}/nixos.nix")
|
(import "${inputs.impermanence}/nixos.nix")
|
||||||
(import inputs.lanzaboote).nixosModules.lanzaboote
|
(import inputs.lanzaboote).nixosModules.lanzaboote
|
||||||
(import inputs.lila).nixosModules.hash-collection
|
(import inputs.lila).nixosModules.hash-collection
|
||||||
|
(import "${inputs.arkheon}/module.nix")
|
||||||
(import "${inputs.stateless-uptime-kuma}/nixos/module.nix")
|
(import "${inputs.stateless-uptime-kuma}/nixos/module.nix")
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
@ -58,7 +59,6 @@ import "${nixpkgs}/nixos/lib/eval-config.nix" {
|
||||||
hydrasect = prev.pkgs.callPackage ../packages/hydrasect { };
|
hydrasect = prev.pkgs.callPackage ../packages/hydrasect { };
|
||||||
codeberg-pages-custom = prev.pkgs.callPackage ../packages/codeberg-pages-custom { };
|
codeberg-pages-custom = prev.pkgs.callPackage ../packages/codeberg-pages-custom { };
|
||||||
readeck = prev.pkgs.callPackage ../packages/readeck { };
|
readeck = prev.pkgs.callPackage ../packages/readeck { };
|
||||||
uptime-kuma-beta = prev.pkgs.callPackage ../packages/uptime-kuma-beta { };
|
|
||||||
})
|
})
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
14
lon.lock
14
lon.lock
|
@ -11,6 +11,16 @@
|
||||||
"url": "https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz",
|
"url": "https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz",
|
||||||
"hash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU="
|
"hash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU="
|
||||||
},
|
},
|
||||||
|
"arkheon": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"fetchType": "tarball",
|
||||||
|
"owner": "raitobezarius",
|
||||||
|
"repo": "arkheon",
|
||||||
|
"branch": "main",
|
||||||
|
"revision": "113724a1a206905e68319676f73d095fcc043a42",
|
||||||
|
"url": "https://github.com/raitobezarius/arkheon/archive/113724a1a206905e68319676f73d095fcc043a42.tar.gz",
|
||||||
|
"hash": "sha256-+BkuEBvFcLRsIe3FoHojRvXeyOS+n3dxPOafBgR4CHo="
|
||||||
|
},
|
||||||
"buildbot-nix": {
|
"buildbot-nix": {
|
||||||
"type": "GitHub",
|
"type": "GitHub",
|
||||||
"fetchType": "tarball",
|
"fetchType": "tarball",
|
||||||
|
@ -164,9 +174,9 @@
|
||||||
"stateless-uptime-kuma": {
|
"stateless-uptime-kuma": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"fetchType": "git",
|
"fetchType": "git",
|
||||||
"branch": "truly-deterministic",
|
"branch": "master",
|
||||||
"revision": "880f444ff7862d6127b051cf1a993ad1585b1652",
|
"revision": "880f444ff7862d6127b051cf1a993ad1585b1652",
|
||||||
"url": "https://git.dgnum.eu/Luj/stateless-uptime-kuma.git",
|
"url": "https://git.dgnum.eu/DGNum/stateless-uptime-kuma.git",
|
||||||
"hash": "sha256-l9fgwesnmFxasCaYUCD7L9bGGJXytLuwtx3CZMgpwJg=",
|
"hash": "sha256-l9fgwesnmFxasCaYUCD7L9bGGJXytLuwtx3CZMgpwJg=",
|
||||||
"submodules": false
|
"submodules": false
|
||||||
},
|
},
|
||||||
|
|
32
machines/lambda/arkheon.nix
Normal file
32
machines/lambda/arkheon.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
age.secrets."arkheon-env".file = ../../secrets/arkheon-env.age;
|
||||||
|
|
||||||
|
nixpkgs.overlays = [ (import "${inputs.arkheon}/overlay.nix") ];
|
||||||
|
|
||||||
|
services.arkheon = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
pythonEnv = pkgs.python3.withPackages (ps: [
|
||||||
|
ps.arkheon
|
||||||
|
ps.daphne
|
||||||
|
ps.psycopg2
|
||||||
|
]);
|
||||||
|
|
||||||
|
domain = "arkheon.luj.fr";
|
||||||
|
|
||||||
|
nginx = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
envFile = config.age.secrets."arkheon-env".path;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -9,6 +9,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./home-julien.nix
|
./home-julien.nix
|
||||||
|
./arkheon.nix
|
||||||
./uptime-kuma.nix
|
./uptime-kuma.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
{
|
{ pkgs, config, ... }:
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
|
|
||||||
services.uptime-kuma = {
|
services.uptime-kuma = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.uptime-kuma-beta;
|
package = pkgs.unstable.uptime-kuma;
|
||||||
settings = {
|
settings = {
|
||||||
NODE_EXTRA_CA_CERTS = "/etc/ssl/certs/ca-certificates.crt";
|
NODE_EXTRA_CA_CERTS = "/etc/ssl/certs/ca-certificates.crt";
|
||||||
};
|
};
|
||||||
|
@ -41,10 +37,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraFlags = [
|
extraFlags = [ "-s" ];
|
||||||
"-s"
|
|
||||||
"-v DEBUG"
|
|
||||||
];
|
|
||||||
|
|
||||||
host = "http://localhost:${builtins.toString 3001}/";
|
host = "http://localhost:${builtins.toString 3001}/";
|
||||||
username = "Julien";
|
username = "Julien";
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
fetchFromGitHub,
|
|
||||||
buildNpmPackage,
|
|
||||||
python3,
|
|
||||||
nodejs,
|
|
||||||
nixosTests,
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildNpmPackage rec {
|
|
||||||
pname = "uptime-kuma";
|
|
||||||
version = "2.0.0-beta.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "louislam";
|
|
||||||
repo = "uptime-kuma";
|
|
||||||
rev = version;
|
|
||||||
hash = "sha256-QWGrwysPS5BxhtjluI30pKWCUo7O3kpL4K8uEb5J3Ik=";
|
|
||||||
};
|
|
||||||
|
|
||||||
npmDepsHash = "sha256-DuXBu536Ro6NA3pPnP1mL+hBdgKCSudV0rxD2vZwX3o=";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 ];
|
|
||||||
|
|
||||||
CYPRESS_INSTALL_BINARY = 0; # Stops Cypress from trying to download binaries
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
cp -r dist $out/lib/node_modules/uptime-kuma/
|
|
||||||
|
|
||||||
# remove references to nodejs source
|
|
||||||
rm -r $out/lib/node_modules/uptime-kuma/node_modules/@louislam/sqlite3/build-tmp-napi-v6
|
|
||||||
'';
|
|
||||||
|
|
||||||
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 = "Fancy self-hosted monitoring tool";
|
|
||||||
mainProgram = "uptime-kuma-server";
|
|
||||||
homepage = "https://github.com/louislam/uptime-kuma";
|
|
||||||
changelog = "https://github.com/louislam/uptime-kuma/releases/tag/${version}";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ julienmalka ];
|
|
||||||
# FileNotFoundError: [Errno 2] No such file or directory: 'xcrun'
|
|
||||||
broken = stdenv.hostPlatform.isDarwin;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +1,17 @@
|
||||||
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
deployment.tags = [ "server" ];
|
deployment.tags = [ "server" ];
|
||||||
|
|
||||||
|
# Enable arkheon
|
||||||
|
age.secrets."arkheon-token".file = ../secrets/arkheon-token.age;
|
||||||
|
services.arkheon.record = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
tokenFile = config.age.secrets."arkheon-token".path;
|
||||||
|
|
||||||
|
url = "https://arkheon.luj.fr";
|
||||||
|
};
|
||||||
|
|
||||||
# Nice motd
|
# Nice motd
|
||||||
programs.rust-motd = {
|
programs.rust-motd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue