files: nextcloud-admin + nextcloud-db clan-vars generators exist (drive-arc T3) #360

Closed
opened 2026-08-09 18:17:59 +00:00 by ben · 1 comment
Owner

Slice T3 of the Nextcloud-provision drive arc — docs/superpowers/specs/2026-08-09-nextcloud-provision-e2e-design.md (commit c72bff1)

files.nix points at /run/secrets/nextcloud-admin / /run/secrets/nextcloud-db but no clan-vars generator renders them anywhere — nextcloud-setup.service fails at adminpassFile on any real deploy.

Build

  • clan.core.vars.generators for nextcloud-admin and nextcloud-db in the files render (the kanidm-tls/kanidm-admins pattern in vmguest.go:116-146 is the model).
  • Early sanity: assert pkgs.nextcloud30 still exists against the community flake's pinned nixpkgs (clan-core pin, seedcommunity.go — NOT this repo's lock); if not, bump defaultNextcloudPackage.

Accept

  • A deployed files machine has both secrets present; nextcloud-setup completes.
  • Generator declared in the same module as its consumer (single home, ADR 0062 posture).
  • Seam-tested render; the live proof rides the arc's drive (T6).
## Slice T3 of the Nextcloud-provision drive arc — `docs/superpowers/specs/2026-08-09-nextcloud-provision-e2e-design.md` (commit `c72bff1`) `files.nix` points at `/run/secrets/nextcloud-admin` / `/run/secrets/nextcloud-db` but **no clan-vars generator renders them anywhere** — `nextcloud-setup.service` fails at `adminpassFile` on any real deploy. ## Build - `clan.core.vars.generators` for `nextcloud-admin` and `nextcloud-db` in the files render (the `kanidm-tls`/`kanidm-admins` pattern in `vmguest.go:116-146` is the model). - Early sanity: assert `pkgs.nextcloud30` still exists against the community flake's pinned nixpkgs (clan-core pin, `seedcommunity.go` — NOT this repo's lock); if not, bump `defaultNextcloudPackage`. ## Accept - A deployed files machine has both secrets present; `nextcloud-setup` completes. - Generator declared in the same module as its consumer (single home, ADR 0062 posture). - Seam-tested render; the live proof rides the arc's drive (T6).
Author
Owner

Done in ccc94f6 (on origin/main).

Generators. The files render now declares clan.core.vars.generators.nextcloud-admin + nextcloud-db beside their consumer (the kanidm-tls/kanidm-admins pattern, vmguest.go) — each an openssl rand -base64 secret owned by the nextcloud user (nextcloud-setup reads it as that user; sops-age keeps the value out of the store). The daemons adminpassFile/dbpassFile now read those generators rendered .path directly (unquoted Nix paths) instead of the /run/secrets/nextcloud-* literals nothing rendered — so the secret nextcloud-setup reads is exactly the one this module renders and can never drift (single home, ADR 0062). The vestigial literal-path plumbing (FilesConfig/FilesLiveSet AdminPassFile/DBPassFile, the NextcloudAdminPassPath/NextcloudDBPassPath constants, the deploy wiring) is retired.

T3 sanity check — real bump. nix eval against the community flakes pinned nixpkgs (clan-cores 26.11pre lock, rev 173d0ad7) shows pkgs.nextcloud30 is GONE and nextcloud31 is an EOL throw; only nextcloud32 (32.0.11) survives. defaultNextcloudPackage bumped 30 → nextcloud32. Fresh provision (T3), so no cross-major upgrade path to honour.

Seam tests. files_test.go asserts both generators render (owner=nextcloud, openssl) and the daemon reads their .path; files_attach_test/deploy_test updated for the retired fields. go build ./... && go vet && go test ./internal/clan ./internal/provision all green; full pre-push go-ci gate green. Live proof rides the arc`s drive (T6).

Done in `ccc94f6` (on `origin/main`). **Generators.** The files render now declares `clan.core.vars.generators.nextcloud-admin` + `nextcloud-db` beside their consumer (the `kanidm-tls`/`kanidm-admins` pattern, `vmguest.go`) — each an `openssl rand -base64` secret owned by the `nextcloud` user (nextcloud-setup reads it as that user; sops-age keeps the value out of the store). The daemon`s `adminpassFile`/`dbpassFile` now read those generators` rendered `.path` directly (unquoted Nix paths) instead of the `/run/secrets/nextcloud-*` literals nothing rendered — so the secret nextcloud-setup reads is exactly the one this module renders and can never drift (single home, ADR 0062). The vestigial literal-path plumbing (`FilesConfig`/`FilesLiveSet` `AdminPassFile`/`DBPassFile`, the `NextcloudAdminPassPath`/`NextcloudDBPassPath` constants, the deploy wiring) is retired. **T3 sanity check — real bump.** `nix eval` against the community flake`s pinned nixpkgs (clan-core`s 26.11pre lock, rev `173d0ad7`) shows `pkgs.nextcloud30` is GONE and `nextcloud31` is an EOL throw; only `nextcloud32` (32.0.11) survives. `defaultNextcloudPackage` bumped 30 → **nextcloud32**. Fresh provision (T3), so no cross-major upgrade path to honour. **Seam tests.** `files_test.go` asserts both generators render (owner=nextcloud, openssl) and the daemon reads their `.path`; `files_attach_test`/`deploy_test` updated for the retired fields. `go build ./... && go vet && go test ./internal/clan ./internal/provision` all green; full pre-push `go-ci` gate green. Live proof rides the arc`s drive (T6).
ben closed this issue 2026-08-09 19:04:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#360
No description provided.