nixos-config/modules/nixos/linux
Sridhar Ratnakumar 293e53071c incus-pet: hello-web example flake — minimal contract demonstration
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).
2026-05-23 14:47:54 -04:00
..
disko Convention-over-configuration layout (#62) 2024-09-28 18:01:53 -04:00
incus incus-pet: hello-web example flake — minimal contract demonstration 2026-05-23 14:47:54 -04:00
server Convention-over-configuration layout (#62) 2024-09-28 18:01:53 -04:00
beszel.nix beszel 2025-12-24 10:46:27 -05:00
current-location.nix Convention-over-configuration layout (#62) 2024-09-28 18:01:53 -04:00
distributed-build.nix remote: speed factor 2024-11-19 10:09:08 -05:00
docker.nix Convention-over-configuration layout (#62) 2024-09-28 18:01:53 -04:00
eternal-terminal.nix et 2025-08-24 13:25:13 -04:00
hedgedoc.nix Convention-over-configuration layout (#62) 2024-09-28 18:01:53 -04:00
nixos-container.nix Convention-over-configuration layout (#62) 2024-09-28 18:01:53 -04:00
parallels-vm.nix Convention-over-configuration layout (#62) 2024-09-28 18:01:53 -04:00
passwordstore.nix Convention-over-configuration layout (#62) 2024-09-28 18:01:53 -04:00