Commit Graph
15 Commits
Author SHA1 Message Date
NixReaper e79a8a996a fix: always restart nixpanel service after binary rebuild in install.sh 2026-04-26 04:54:08 -05:00
NixReaper 2eb8198267 fix: stop nixpanel service before overwriting binary to avoid text file busy error on reinstall 2026-04-25 21:38:56 -05:00
NixReaper 144d08a581 fix: skip UPX .d metadata files when copying section binaries 2026-04-25 17:15:34 -05:00
NixReaper 5247c77132 feat: add Rust backend — workspace with section executables
Cargo workspace with four crates:
- nixpanel-common: shared SectionRequest/SectionResponse types
- nixpanel-api: main Axum HTTP server (JWT auth, DB, routing)
- nixpanel-services: section binary for systemctl start/stop/restart
- nixpanel-sysinfo: section binary for CPU/RAM/disk/OS/version reads

nixpanel-api features:
- POST /api/auth/login — Argon2id verification, HS256 JWT
- GET  /api/dashboard  — real account counts + sysinfo + versions
- GET  /api/services   — live systemctl status via section binary
- POST /api/services/:name/:action — start/stop/restart
- GET  /api/accounts   — list from MariaDB
- POST /api/accounts   — create account + system user

Section binaries are UPX-compressed after build.
DB schema auto-migrated on first start; admin user seeded from
/opt/nixpanel/.admin_user + .admin_pass files.

Frontend changes:
- nixserver/src/api.ts + App.tsx wired to real API (JWT stored in
  localStorage, real data in dashboard/services/accounts)
- nixclient/src/api.ts added
- Both vite configs get /api proxy to localhost:4000 for dev
- install.sh updated to copy + compress all section binaries
2026-04-25 16:41:57 -05:00
NixReaper 4428a49876 fix: auto-generate admin creds, fix NixClient build path
- Replace interactive read prompts with auto-generated password
  (openssl rand) so curl|bash installs work without a TTY
- Display username/password in the completion banner
- Fix NixClient package.json check to use absolute path $SRC_DIR
  (was relative, broke after 'cd nixserver' changed cwd)
2026-04-25 10:17:42 -05:00
NixReaper 7603fa5793 fix: add Node.js 20 LTS as its own install step, show npm build errors
- Node.js now has its own step (nodejs.done) separate from the packages
  step, so it always runs even when packages.done already exists
- Checks for Node 18+ and skips reinstall if already present
- Removed --silent and 2>/dev/null from npm commands so build errors
  are visible instead of silently killing the installer
2026-04-25 09:56:59 -05:00
NixReaper fb975cdc4e fix: install Node.js 20 LTS before UI build steps
npm was never installed, causing the NixServer/NixClient builds to fail
immediately after 'Building NixServer...' with no visible error.

Added NodeSource setup_20.x before the ondrej/php PPA, then included
nodejs in the apt-get install list. NodeSource gives us npm 10+ and
Node 20 LTS rather than Ubuntu's stale node package.
2026-04-25 09:55:31 -05:00
NixReaper 5881f06cbc fix: always clean-clone source dir, drop stale master refspec workaround
The old .git/config in /opt/nixpanel/src had a fetch refspec pointing to
refs/heads/master (from before the branch rename). Re-running the installer
with that directory present caused 'git fetch' to fail with 'couldn't find
remote ref refs/heads/master'.

Fix: rm -rf the source dir before cloning whenever the source step hasn't
been marked done, so we always get a clean checkout with the correct branch.
2026-04-25 09:37:40 -05:00
NixReaper 5cefe15f6a fix: make git clone fallback explicitly use main branch
The releases API returns 404 when no releases exist, causing the installer
to fall back to 'main'. However, the fallback clone was not explicitly
specifying a branch, which could cause issues if the repository's default
branch configuration is in an inconsistent state. Now the fallback clone
also explicitly uses --branch main to ensure consistent behavior.
2026-04-25 09:26:56 -05:00
NixReaper e58769a4bd feat: add NixServer and NixClient React UIs, wire into installer
- nixserver/: React 18 + TypeScript + Vite + Tailwind
  - Login page + placeholder admin dashboard with card grid
  - Blue accent color (#3b82f6)
  - Full Tailwind + PostCSS + TypeScript setup
- nixclient/: identical structure, user-facing panel
  - Green accent color (#10b981)
  - Same build tooling as NixServer
- install.sh: new 'Building NixServer & NixClient UIs' step
  - npm install + npm run build for each
  - Outputs to /opt/nixpanel/nixserver/dist and /opt/nixpanel/nixclient/dist
  - Both panels immediately accessible via Apache on 2087 and 2083
  - Skips gracefully if source not present (early dev)
2026-04-25 09:22:12 -05:00
NixReaper 8b1e42171a chore: polish repo — README badges, CHANGELOG, LICENSE, install.sh cleanup
- README: add shields.io badges, fix stack (Rust, not Node.js),
  add licensing plan table, improve structure throughout
- CHANGELOG: proper Keep a Changelog format, document v0.1.0-alpha
- LICENSE: expand source-available terms with clearer restrictions
- install.sh: strip licensing/website-api build steps (those run on
  nixpanel.io/license.nixpanel.io, not on customer servers); add
  license key prompt + activation against license.nixpanel.io; keep
  only the panel DB; fix Apache to only expose ports 2083/2087
2026-04-25 05:05:04 -05:00
NixReaper f54b5cd582 fix: self-update + fold PPA into packages step
On Ubuntu 24.04, PHP 8.2 is not in the default apt repos.
The ondrej/php PPA must be added before package installation.

Previously this was a separate step that could be bypassed when
running a locally-cached (pre-fix) copy of install.sh.

Changes:
- Add self-update block: script fetches latest version from GitHub
  and re-execs itself, so stale local copies are never used
- Remove standalone php_ppa step; PPA is now added unconditionally
  inside the packages step (checks if already present to avoid
  duplicate adds on re-runs)
- Idempotent: grep checks sources.list before calling
  add-apt-repository
2026-04-23 17:43:05 -05:00
NixReaper 6f2a2bac6b fix: add ondrej/php PPA before package install — required for PHP 8.2 on Ubuntu 24.04 2026-04-23 17:32:59 -05:00
NixReaper c919378d32 feat: update installer — Rust build, MariaDB setup, RSA keygen, all systemd services 2026-04-23 17:08:59 -05:00
NixReaper db2e4f8959 chore: initial public repo — README, install script, changelog, license 2026-04-11 15:48:55 -05:00