Commit graph

99 commits

Author SHA1 Message Date
Sridhar Ratnakumar
d830fd287c clankers need python 2026-06-02 11:29:58 -04:00
Sridhar Ratnakumar
b4a60aaf3a
ralph(eval): reduce Nix eval time for pureintent + zest (#120)
* ralph(eval): baseline + benchmark harness

pureintent cpuTime 23.17s, zest cpuTime 14.93s (median of 5).
Methodology: NIX_SHOW_STATS cpuTime, eval-cache off, warm fetcher cache.

* ralph(eval) cycle 1: disable NixOS options manual on pureintent

documentation.nixos.enable = false. Generating the NixOS manual evaluates
every option's doc string. nrThunks 20,400,114 -> 19,201,996 (-5.9%),
nrFunctionCalls -6.2%, nrPrimOpCalls -7.5%. Package man pages unaffected.

Metric pivoted to deterministic NIX_SHOW_STATS counters: cpuTime is unusable
on this thermally-throttling machine (same eval = 11s..21s).

* ralph(eval): switch home target zest -> sincereintent (per request)

sincereintent home config baseline: nrThunks 5,323,428 / calls 3,227,404 /
primops 1,565,120 (deterministic).

* ralph(eval) cycle 2: disable home-manager options manpage

manual.manpages.enable = false in shared modules/home/default.nix. HM builds
home-configuration.nix(5) by default, evaluating every HM option's doc string.
sincereintent nrThunks 5,323,428 -> 3,551,679 (-33.3%), calls -35%, primops -39%.

* ralph(eval): record cycle-2 pureintent gain (shared HM module)

pureintent nrThunks 19,201,996 -> 17,431,437 (-9.2%); cycle-2's
manual.manpages.enable=false also feeds pureintent's embedded home-manager
via modules/nixos/default.nix. Total pureintent -14.6% from baseline.

* ralph(eval) cycle 3: profiling + dead-ends (no behaviour-preserving win)

Confirmed: nixpkgs single-instantiation (no 2x trap), unused inputs are lazy
(no counter impact), escapeShellArg hotspot is HM file-linking + /etc (not
patchable here). Remaining eval cost is feature-bound (embedded HM, vira/kolu,
google-cloud-sdk/pandoc/omnix).

* ralph(eval) cycle 4: drop heavy home.packages (yt-dlp/lima/omnix/pandoc/gcloud)

User-approved behaviour change. Removed from shared modules/home/cli/terminal.nix
(kept hledger). pureintent nrThunks 17,431,437 -> 16,989,720 (-2.5%),
sincereintent 3,551,679 -> 2,757,201 (-22.4%). Totals from baseline:
pureintent -16.7%, sincereintent -48.2%.

* ralph(eval): finalize report (final measurement, key findings, cost breakdown)
2026-05-29 07:19:48 -04:00
Sridhar Ratnakumar
87441d5270 stuf 2026-05-27 21:29:04 -04:00
Sridhar Ratnakumar
776c4425b0 incus-pet: shared /nix/store, restart-to-deploy, drop anywhen flake input
The incus-pet CLI gains three big changes that together cut per-container
disk usage by ~5GB, drop nix-rebuild + nix-copy from the deploy path, and
make `deploy` actually pull latest on every invocation. anywhen migrates
from a host-installed service to an incus-pet container in the process.

* Shared /nix/store mount. Each container gets host's /nix/store
  bind-mounted read-only (with shift=true for idmapped unprivileged
  containers). Zero per-container duplication of nixpkgs closures. The
  CLI builds toplevels on the host; the container sees them via the
  shared mount, no `nix copy` needed.

* Restart-to-deploy. switch-to-configuration is removed entirely (it
  was stalling on dbus-broker reload and hitting the same lock-
  contention bug across redeploys). New activation: update
  /nix/var/nix/profiles/system, repoint /sbin/init through the profile
  symlink, `incus restart`. The new toplevel's own init script handles
  /etc setup on boot. Trade-off: ~5s of container reboot per deploy.

* Marshaling flake exposes only nixosModules.default. No nixpkgs
  input, no nixosConfigurations entry. The CLI picks nixpkgs at build
  time (pinned to nixos-25.11 — matches the LXC image baseline, dodges
  unstable regressions) and assembles the full nixosSystem via
  `nix build --impure --expr`. Lets us bump nixpkgs without touching
  per-deploy state.

* `nix flake update --refresh` on every deploy. Was `nix flake lock`,
  which only locks first-seen inputs — re-deploying `github:srid/anywhen`
  stayed pinned at the first commit ever resolved. Now every deploy
  bumps the target input to the current tip of its ref and bypasses
  nix's fetcher cache.

* /sbin/init repoint. The NixOS LXC image hard-links /sbin/init to its
  own toplevel's init path. Without switch-to-configuration, `incus
  restart` re-execs that old init, which sets up /etc from the old
  toplevel — running services keep using the OLD anywhen binary even
  though the profile pointer moved. CLI now also does
  `ln -sfn /nix/var/nix/profiles/system/init /sbin/init` so the profile
  actually drives boot. Idempotent.

* Host gcroot via `nix-store --add-root --indirect`. Container's nix DB
  doesn't know about the path (it lives behind the shared mount), so
  without a host-side gcroot the host could nix-collect-garbage the
  running system out from under the container. Symlink at
  ~/.local/state/incus-pet/<name>/system. Only the LATEST toplevel is
  pinned per app — no rollback today (file a 5-line ring buffer when
  rollback matters).

* anywhen flake input removed. `modules/nixos/linux/anywhen.nix` is
  gone; the host config no longer imports anywhen as a flake input.
  The deploy command takes the flake ref as an argument, so locking it
  here was just bloat. `just pureintent anywhen-deploy` runs the
  current invocation.

* pureintent ops recipes. New `configurations/nixos/pureintent/mod.just`
  with anywhen-{deploy,rm,backup,restore,status,shell}. Namespaced via
  `mod pureintent` so each host's recipes live behind their own prefix.

* Drop ssh from deploy path. Bootstrap still pushes the operator's
  pubkey (for interactive debugging), but activation goes through
  `incus exec` exclusively. No NIX_SSHOPTS, no nix-copy-via-ssh,
  no host-key TOFU dance during deploys.

Tested end-to-end on pureintent: anywhen migrated from host-installed
(21-task SQLite DB at /var/lib/anywhen) to an incus-pet container with
the DB intact; hello-web deployed fresh with shared /nix/store; both
serve over the tailscale proxy at 100.122.32.106:{6111,8081}; lock
bumps + new toplevels confirmed after master advances.
2026-05-23 18:50:10 -04:00
Sridhar Ratnakumar
db61baee31 anywheren stuff 2026-05-23 12:19:14 -04:00
Sridhar Ratnakumar
b21e289d74
pureintent: include ~/.pu-state/*/ssh_config in ~/.ssh/config (#116)
* ssh include for pu-state

* route ssh user=pu via socks5 proxy
2026-05-15 12:22:23 -04:00
Sridhar Ratnakumar
43b9f34635 pu 2026-05-14 21:35:55 -04:00
Sridhar Ratnakumar
257f71c673 rename 2026-05-14 15:32:58 -04:00
Sridhar Ratnakumar
bc5e7c8d27
pureintent: add devbox.nix with proxychains + devbox-run wrapper (#114)
Routes shell-invoked commands through the existing jumphost SOCKS5 proxy
(programs.jumphost.socks5Proxy), so Go tools that bypass libc (nix, step,
pu) pick up the proxy via ALL_PROXY/HTTPS_PROXY/HTTP_PROXY while libc
callers (ssh) get it via proxychains.

Usage: devbox-run nix run github:juspay/project-unknown -- connect <name>
2026-05-13 16:21:31 -04:00
Sridhar Ratnakumar
bb8b8aa76c pureintetn: wifi stuff 2026-05-12 17:59:39 -04:00
Sridhar Ratnakumar
0d3f0c5ef5 kolu: darwin 2026-04-30 12:07:01 -04:00
Sridhar Ratnakumar
040cf1e004 pureintent: allow passwordless activate rebuild 2026-04-23 12:51:54 -04:00
Sridhar Ratnakumar
a3bd52468a Install zmx on pureintent 2026-04-23 12:24:11 -04:00
Sridhar Ratnakumar
9b2db0501f Unfuck tailscale post incus 2026-04-19 11:52:06 -04:00
Sridhar Ratnakumar
4c648e912c
Enable incus on pureintent (#113)
* Enable incus on pureintent, rename lxd.nix, drop unused flake-parts

- Add incus module import to pureintent and bind the UI to its
  Tailscale IP (no firewall change needed since tailscale0 is trusted).
- Rename modules/nixos/linux/lxd.nix -> incus.nix since the module
  configures virtualisation.incus, and enable the bundled web UI.
- Drop the unused modules/flake-parts/incus-image helper; the
  `images:nixos/*` community images cover container/VM launches.

* Move incus module into a directory with a README

The troubleshooting notes used to live as comments in the module; they
belong in docs alongside a quick-start on launching containers/VMs and
configuring the UI listener.

* Expand incus README with VM gotchas

Document the sharp edges hit while bringing up a NixOS VM for the first
time: secureboot, memory/cpu/disk limits (with the error signatures
that point at each), configuring the guest (flakes, firewall), and a
three-step guide to exposing a service from inside.
2026-04-19 11:21:39 -04:00
Sridhar Ratnakumar
6f38a2d2fb claude:.. 2026-04-11 10:30:39 -04:00
Sridhar Ratnakumar
57eb3129c0 cc from officia, 2026-04-09 17:54:15 -04:00
Sridhar Ratnakumar
6fed51e1a8 speechd 2026-04-04 17:07:23 -04:00
Sridhar Ratnakumar
2e1e36520c remove 2026-04-04 13:47:23 -04:00
Sridhar Ratnakumar
c13a063d25 add /fact-check command; enable juspay litellm on pureintent 2026-03-31 18:37:50 -04:00
Sridhar Ratnakumar
f9c1fc0fc7 fuck 2026-03-31 14:32:34 -04:00
Sridhar Ratnakumar
35ac61cfdc gc 2026-03-27 21:00:08 -04:00
Sridhar Ratnakumar
f6bd6847c4 controlpersist 2026-03-23 20:50:31 -04:00
Sridhar Ratnakumar
219f17d8ba
Add kolu home service for pureintent (#111)
* Add kolu home service for pureintent

Depends on https://github.com/juspay/kolu/pull/21

* Update kolu input to main (PR merged)
2026-03-21 20:17:57 -04:00
Sridhar Ratnakumar
60dd17f5fa claude: no sandbox 2026-03-18 10:46:12 -04:00
Sridhar Ratnakumar
282bc79322
ssh agent forwarding fix for zellij (#106) 2026-03-14 15:29:45 -04:00
Sridhar Ratnakumar
667543ceca
opencode: use upstream juspay/oc home module (#105) 2026-03-12 18:18:51 -04:00
Sridhar Ratnakumar
ace0f50ace web- 2026-03-12 15:15:09 -04:00
Sridhar Ratnakumar
cd4805d5dd
Enable opencode web service on pureintent (#104)
- Add opencode/web.nix module for web service configuration
- Bind to Tailscale IP (100.122.32.106) on port 4096
- Pass JUSPAY_API_KEY from agenix secret to service
- Update flake inputs: nixpkgs/unstable, nix-darwin/master, home-manager/master
2026-03-11 22:58:45 -04:00
Sridhar Ratnakumar
f13b2406c6
Add opencode home-manager module for zest and pureintent (#103)
* Add opencode home-manager module for zest and pureintent

* Move claude-code Juspay config to separate module

* Add JUSPAY_API_KEY export for opencode
2026-03-11 13:56:30 -04:00
Sridhar Ratnakumar
cea0595d60 Unused 2026-03-11 13:21:05 -04:00
Sridhar Ratnakumar
77969a85f0 pureintent: ts 2026-02-27 18:34:42 -05:00
Sridhar Ratnakumar
62890af2cc chore(template): parameterize user accounts and update README onboarding instructions 2026-02-19 14:22:11 -05:00
Sridhar Ratnakumar
7cc72327f6 pureintent: reborn 2026-02-12 16:09:59 -05:00
Sridhar Ratnakumar
0779884c9c imp 2026-02-05 19:34:10 -05:00
Sridhar Ratnakumar
9d84a8e9ca rm glances 2025-12-24 13:42:20 -05:00
Sridhar Ratnakumar
12778e5393 beszel 2025-12-24 10:46:27 -05:00
Sridhar Ratnakumar
31add36609 pureintent: add swap 2025-12-16 16:47:43 -05:00
Sridhar Ratnakumar
5ee5ed762d obs srv hosted 2025-11-22 19:07:34 -05:00
Sridhar Ratnakumar
d64bacdb90
Reorganize home modules into logical categories (#100) 2025-11-21 14:17:20 -05:00
Sridhar Ratnakumar
8983896a17 pureintent: direct access 2025-11-19 20:43:09 -05:00
Sridhar Ratnakumar
f632e95717 gotty to ttyd 2025-10-30 11:21:04 -04:00
Sridhar Ratnakumar
7bd20016ed redundant 2025-10-29 15:19:00 -04:00
Sridhar Ratnakumar
a31fc28237 gotty 2025-10-29 10:46:24 -04:00
Sridhar Ratnakumar
7bfd1777b4 pureintent: sub 2025-10-26 18:30:54 -04:00
Sridhar Ratnakumar
07d599cdfa .. 2025-10-21 15:52:13 -04:00
Sridhar Ratnakumar
4745fdf41e pureintent: enable lingering 2025-10-21 08:31:17 -04:00
Sridhar Ratnakumar
3a116c299e remote builder janitor 2025-10-20 21:34:56 -04:00
Sridhar Ratnakumar
4767babb84 pureintent: more 2025-10-20 14:22:34 -04:00
Sridhar Ratnakumar
5dcc0c1f2c back to pureintent; remove cloudflare stuff 2025-10-20 13:57:41 -04:00