Add comprehensive plan for making Darling fully capable of running Nix
Split into focused documents under plan/ to keep context manageable:
- 00-background: motivation, prior art, current state analysis
- 01-blockers: 7 identified blockers (lchflags, sandbox-exec, renameatx_np, etc.)
- 02-phase0: flake.nix, devShell with all tools for Zed, .envrc
- 03-phase1: core syscall fixes (setattrlist, renameatx_np, utimensat, etc.)
- 04-phase2: sandbox-exec stub, sandbox API fixes
- 05-phase3: automated Nix installation inside Darling
- 06-phase4: derivation building (trivial → stdenv → binary substitution)
- 07-phase5: nix-daemon, multi-user mode, Directory Services stubs
- 08-phase6: NixOS VM tests, syscall regression suite, GitHub Actions CI
- 09-phase7: Darling as a nix.buildMachines remote builder
- 10-phase8: stretch goals (aarch64-darwin, GUI testing, binary cache)
- 11-architecture: system diagram, key technical decisions, glossary
Inspired by nixie-dev/darling-nix and ersei's 'Nix All The Way Down' blog post.