Commit graph

522 commits

Author SHA1 Message Date
Sridhar Ratnakumar
d246da2f79 drishti 2026-05-30 19:44:55 -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
5a0b2b4207 kolu 2026-05-20 07:46:30 -04:00
Sridhar Ratnakumar
a28ba07abb
Optimize pureintent eval time (Ralph) (#117)
* docs: Ralph report scaffolding + pureintent eval baseline (10.87s)

* cycle-1: drop nixvim — pureintent eval 10.87s → 6.98s (-36%)

nixvim's home-manager module system is by far the dominant cost of
evaluating `nixosConfigurations.pureintent`: a profile of selective
imports puts it at 3.97s of the 10.87s baseline (~36%).

Replace it with a minimal `programs.neovim.enable = true` configuration.
The runtime behaviour of `nvim` changes (no plugins, no LSP, no
mapleader/telescope/treesitter/etc.) — accepted by the user.

Measured on srid-nc (nixos, 6.12.85 kernel), 7 warm-cache runs with
`--option eval-cache false`:

  baseline: 10.85 10.86 10.86 10.87 10.87 10.88 10.91 -> median 10.87s
  cycle-1:  6.94  6.96  6.98  6.98  7.02  7.02  7.73 -> median 6.98s

Other configurations still evaluate:
  - nixosConfigurations.naiveintent
  - darwinConfigurations.infinitude-macos
  - homeConfigurations."srid@zest"

Removes flake input `nixvim` (+ its `flake-parts`, `nixpkgs`, `systems`
sub-inputs from the lock).

* docs: wrap up Ralph report (10.87s -> 6.99s = -35.7%)

7 dead-ends documented so they don't have to be re-tried. Key
finding: after dropping nixvim (cycle 1), the eval floor is
home-manager's per-entry submodule materialisation
(systemd.user.services / programs.ssh.matchBlocks), not the
option-declaration count of any wrapper module. Inlining
jumphost-nix or vira moves the cost; it does not eliminate it.
2026-05-15 13:32:03 -04:00
Sridhar Ratnakumar
9079910f7c kolu 2026-05-15 10:25:46 -04:00
Sridhar Ratnakumar
43b9f34635 pu 2026-05-14 21:35:55 -04:00
Sridhar Ratnakumar
fa3cf0b350 up 2026-05-13 15:00:16 -04:00
Sridhar Ratnakumar
dfaed502aa kolu 2026-05-12 19:13:46 -04:00
Sridhar Ratnakumar
af2404e6e5 kolu 2026-05-12 17:59:28 -04:00
Sridhar Ratnakumar
a3bd52468a Install zmx on pureintent 2026-04-23 12:24:11 -04:00
Sridhar Ratnakumar
6130fcef8d Update kolu back to master 2026-04-23 12:16:30 -04:00
Sridhar Ratnakumar
a9c844e704 kolu: Update 2026-04-19 11:28:53 -04:00
Sridhar Ratnakumar
4805edf56b Update input 2026-04-19 09:46:07 -04:00
Sridhar Ratnakumar
5661ec53d5 unne. 2026-04-14 21:47:35 -04:00
Sridhar Ratnakumar
7de488b235 unnerf opus 2026-04-13 18:24:54 -04:00
Sridhar Ratnakumar
d9b6285774 back to mast 2026-04-10 16:14:18 -04:00
Sridhar Ratnakumar
19e85a553e Update 2026-04-09 17:45:27 -04:00
Sridhar Ratnakumar
2e1e36520c remove 2026-04-04 13:47:23 -04:00
Sridhar Ratnakumar
988afd2ad9 up 2026-03-27 18:07:09 -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
7eded386bb update AI 2026-03-19 07:55:17 -04:00
Sridhar Ratnakumar
e5fa70c254 opencode: switch to anthropic opus 4.6 max, drop juspay provider 2026-03-18 21:13:36 -04:00
Sridhar Ratnakumar
dfbcc3663c Update some stuff 2026-03-16 18:27:14 -04:00
Sridhar Ratnakumar
11bde0d900 Restore skills 2026-03-16 17:39:42 -04:00
Sridhar Ratnakumar
0537ef99b9
Migrate AI config to nixos-config, use nix-agent-wire (#107)
- Move AI config from nix-agent-wire/srid to ./AI
- Update flake input: srid/AI -> srid/nix-agent-wire
- Update home modules to use local AI folder via flake.self.outPath
2026-03-16 16:58:08 -04:00
Sridhar Ratnakumar
f61aa49c4d Remove submodules entirely 2026-03-14 09:22:23 -04:00
Sridhar Ratnakumar
f5f8c89006 opencode: use AI flake input with home-manager module
- Remove vendor/AI git submodule, use github:srid/AI flake input
- Import AI's opencode home-manager module for autoWire
- Set OPENCODE_DISABLE_CLAUDE_CODE=1
2026-03-13 20:46:29 -04:00
Sridhar Ratnakumar
667543ceca
opencode: use upstream juspay/oc home module (#105) 2026-03-12 18:18:51 -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
635ed169f7 Use https://github.com/srid/landrun-nix/pull/18 2026-03-06 09:21:33 -05:00
Sridhar Ratnakumar
5c56981508 vira: github app mvp 2026-03-02 10:26:52 -05:00
Sridhar Ratnakumar
3ac0541208 add a package 2026-02-28 07:12:44 -05:00
Sridhar Ratnakumar
1bf5049ebb drop nu 2026-02-14 19:33:12 -05:00
Sridhar Ratnakumar
d04fef9603 vira: Update 2026-01-26 09:27:34 -05:00
Sridhar Ratnakumar
4919c45017 Update inputs 2025-12-31 11:14:12 -05:00
Sridhar Ratnakumar
bcfd7d5e04 stuff 2025-12-18 21:07:32 -05:00
Sridhar Ratnakumar
96453e837a 25.11 2025-12-02 11:04:11 -05:00
Sridhar Ratnakumar
39fdc1f887 Fix some warnings 2025-11-29 14:53:18 -05:00
Sridhar Ratnakumar
9de6a1977f Let nixpkgs advance 2025-11-29 14:48:37 -05:00
Sridhar Ratnakumar
b44026f5a1 vira: Update 2025-11-28 14:30:06 -05:00
Sridhar Ratnakumar
e9bf3a7018 Update stuff 2025-11-27 15:04:44 -05:00
Sridhar Ratnakumar
c7f82dce59
LiteLLM + Claude Code configuration (#101) 2025-11-25 10:38:19 -05:00
Sridhar Ratnakumar
c1c4a5a45c AI: as submodule 2025-11-20 15:05:34 -05:00
Sridhar Ratnakumar
634081939b use AI as submodule 2025-11-20 14:40:14 -05:00
Sridhar Ratnakumar
16d7918892 upstream 2025-11-20 14:29:17 -05:00
Sridhar Ratnakumar
c4002dbda5 obsidian stuff 2025-11-18 10:44:05 -05:00
Sridhar Ratnakumar
557e220abb Vira 2025-11-15 15:03:48 -05:00
Sridhar Ratnakumar
ec36ec3517 nix: Update primary inputs 2025-11-12 15:05:16 -05:00