Commit graph

254 commits

Author SHA1 Message Date
Sridhar Ratnakumar
10d35972af stuff 2026-07-11 13:46:45 -04:00
Sridhar Ratnakumar
b2706b6f7f cache 2026-07-09 12:00:02 -04:00
Sridhar Ratnakumar
5eaa6b9671 ... 2026-07-09 10:46:46 -04:00
Sridhar Ratnakumar
54e0b0f276 xb 2026-07-08 16:04:06 -04:00
Sridhar Ratnakumar
3947eee7bf packages.. 2026-07-08 15:29:19 -04:00
Sridhar Ratnakumar
d4efcd4471 Merge branch 'master' of github.com:srid/nixos-config
# Conflicts:
#	configurations/nixos/naiveintent/default.nix
2026-07-07 20:46:31 -04:00
Sridhar Ratnakumar
a9d93f2c7b update stuff 2026-07-07 20:45:21 -04:00
Sridhar Ratnakumar
4c85b9d8af Merge branch 'master' of https://github.com/srid/nixos-config 2026-07-07 20:43:41 -04:00
Sridhar Ratnakumar
bfb602169c 1p 2026-07-07 20:43:38 -04:00
Sridhar Ratnakumar
fa89a74721 w1 2026-07-02 17:40:14 -04:00
Sridhar Ratnakumar
66eaa2baef pulam-web 2026-06-24 20:56:20 -04:00
Sridhar Ratnakumar
7ee4b8800e opencode: use Juspay config via upstream home module
Consume juspay/AI's homeModules.opencode (config only, not the package) on
both zest and pureintent, install the opencode binary from nixpkgs, and
export JUSPAY_API_KEY from the agenix secret into interactive shells.
2026-06-21 16:59:29 -04:00
Sridhar Ratnakumar
915f0fbac8 some 2026-06-19 13:51:51 -04:00
Sridhar Ratnakumar
3694d97bba stuff 2026-06-18 17:23:15 -04:00
Sridhar Ratnakumar
1a0e98a513 zmx no more, fuck zig 2026-06-09 16:43:17 -04:00
Sridhar Ratnakumar
7fc1735c34 tadata 2026-06-06 10:33:47 -04:00
Sridhar Ratnakumar
43521a183f nw 2026-06-06 09:39:49 -04:00
Sridhar Ratnakumar
66cc63d988 portfwd+ 2026-06-02 17:21:33 -04:00
Sridhar Ratnakumar
d830fd287c clankers need python 2026-06-02 11:29:58 -04:00
Sridhar Ratnakumar
d246da2f79 drishti 2026-05-30 19:44:55 -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
0e0c16c460 twitter-convert, restore minimally 2026-05-20 08:06:44 -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
cf713af87b nix-ld 2026-05-12 19:13:44 -04:00
Sridhar Ratnakumar
af4d3a6653 drop beszel 2026-05-12 18:56:11 -04:00
Sridhar Ratnakumar
3ecb65268a Add naiveintent 2026-05-12 18:14:21 -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
a02710abe0 Unused 2026-04-19 09:46:33 -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
4937e68d5c umm 2026-03-20 16:13:53 -04:00
Sridhar Ratnakumar
60dd17f5fa claude: no sandbox 2026-03-18 10:46:12 -04:00