mirror of
https://github.com/srid/nixos-config.git
synced 2026-07-16 22:01:33 +08:00
Self-contained reference under
modules/nixos/linux/incus/incus-pet/example/hello-web/ that satisfies
the incus-pet contract in the smallest possible form:
- packages.<sys>.default a darkhttpd wrapper that serves a
one-page index.html, reading HOST/PORT
from the environment
- nixosModules.default services.hello-web.{enable, package,
host, port} + a DynamicUser=true systemd
unit
- nixosModules.incus the deploy contract: services.hello-web
bound to 8080, hostname "hello-web"
Useful as a copy-paste template for new apps. Less moving parts than
the anywhen reference (no bun, no SQLite, no state dir, no e2e tests
to keep green) — just three flake outputs and a static HTML response.
Live-deployed end-to-end on pureintent during this PR's bring-up:
$ incus-pet deploy path:./.../example/hello-web hello-web \
--port 8081 --listen 100.122.32.106
$ curl http://100.122.32.106:8081/
<!doctype html>
<h1>Hello from incus-pet</h1>
Idempotent re-deploy verified (no flags needed — host-port + listen
read back from container metadata; container name auto-detected from
incus.container.hostname).
|
||
|---|---|---|
| .. | ||
| disko | ||
| incus | ||
| server | ||
| beszel.nix | ||
| current-location.nix | ||
| distributed-build.nix | ||
| docker.nix | ||
| eternal-terminal.nix | ||
| hedgedoc.nix | ||
| nixos-container.nix | ||
| parallels-vm.nix | ||
| passwordstore.nix | ||