server: plant: drop

This commit is contained in:
2026-07-24 14:03:08 +08:00
parent 81886537fd
commit 4bd6d33b3d
3 changed files with 0 additions and 96 deletions
Generated
-18
View File
@@ -908,23 +908,6 @@
"type": "github"
}
},
"plant": {
"flake": false,
"locked": {
"lastModified": 1758423341,
"narHash": "sha256-dHcKh7T8I70bKPwgqO5MxZ9bWHINwzRPhFp5waQy2r8=",
"ref": "refs/heads/master",
"rev": "08dc0b3889797eb3618c7475c3c367ec0e5fdf40",
"revCount": 6,
"type": "git",
"url": "ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git"
},
"original": {
"rev": "08dc0b3889797eb3618c7475c3c367ec0e5fdf40",
"type": "git",
"url": "ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git"
}
},
"root": {
"inputs": {
"angrr": "angrr",
@@ -950,7 +933,6 @@
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"noctalia": "noctalia",
"plant": "plant",
"sops-nix": "sops-nix",
"stylix": "stylix",
"system76-scheduler-niri": "system76-scheduler-niri",
-4
View File
@@ -117,10 +117,6 @@
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
plant = {
url = "git+ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git?rev=08dc0b3889797eb3618c7475c3c367ec0e5fdf40";
flake = false;
};
my-templates.url = "git+https://git.imxyy.top/imxyy1soope1/flake-templates";
# Flattened indirect dependencies
-74
View File
@@ -1,74 +0,0 @@
{
inputs,
pkgs,
lib,
...
}:
let
app = pkgs.buildNpmPackage (finalAttrs: {
pname = "HF-plant";
version = "unstable-2025-09-21";
src = inputs.plant;
buildPhase = ''
runHook preBuild
npm run build
npm run build:proxy
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir $out
mv dist $out
cp .env proxy-server-bundled.js $out
runHook postInstall
'';
npmDepsHash = "sha256-ret4BtjrEt8L1nlvJmFiejAKmbz89Z7NSiKs+qlB51w=";
});
in
{
systemd.services.HF-plant-proxy = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${lib.getExe pkgs.bash} -c 'source ${app}/.env; export FEISHU_APP_ID FEISHU_APP_SECRET AMAP_JSCODE; ${lib.getExe pkgs.nodejs} ${app}/proxy-server-bundled.js'";
Restart = "always";
RestartSec = 120;
};
};
services.caddy.virtualHosts."plant.imxyy.top" = {
extraConfig = ''
handle /api/* {
reverse_proxy localhost:3001
}
handle /* {
root * ${app}/dist
try_files {path} /index.html
file_server
}
'';
};
services.frp.instances."".settings.proxies = [
{
name = "plant-http";
type = "http";
localIP = "127.0.0.1";
localPort = 80;
customDomains = [ "plant.imxyy.top" ];
}
{
name = "plant-https";
type = "https";
localIP = "127.0.0.1";
localPort = 443;
customDomains = [ "plant.imxyy.top" ];
}
];
}