SLOPSHOPPER

sysinit-diff

State-aware Neovim diff panes

commandprocess
A shopper browsing a rack in a slop shop
README

sysinit

Nix-managed dotfiles for macOS on Apple Silicon and NixOS. This repository owns system configuration, Home Manager modules, package overlays, and shared shell and agent tooling.

Build and apply

Install Nix, clone this repository, and select a host from hosts/default.nix. Review the host settings before applying them to another machine.

nix develop
nh darwin build .#lv426
nh darwin switch .#lv426

For NixOS, use the configured Linux host:

nh os build .#arrakis
nh os switch .#arrakis

A build checks the configuration without activating it. A switch applies it. Use the installed nh for routine builds and switches.

Structure

PathPurpose
hosts/Host identities, profiles, and machine settings
modules/darwin/macOS system and desktop configuration
modules/nixos/NixOS system configuration
modules/home/Home Manager programs and user configuration
modules/shared/Shared options and command paths
overlays/Custom packages and upstream patches
pkgs/Local command implementations
hack/Maintenance and validation commands
checks/Behavior and configuration checks

The minimal, dev, and workstation profiles add shell tools, development tools, and desktop applications in that order.

sysinit.nvim owns the editor configuration. sysinit.wezterm owns the terminal configuration. This flake pins both repositories and supplies host settings.

Validate changes

nix fmt -- --check
nix develop --command bash hack/lint.sh --all
nix flake check

AGENTS.md describes repository conventions and known failure modes. Edit managed configuration in its Nix source.

Create a separate host repository

nix flake init -t github:roshbhatia/sysinit#discrete

The discrete template consumes this flake and keeps host settings in a separate repository.

Source 1 files
hooks/register.ts 20 lines
1import type { Register } from "claude-code";
2
3export const register: Register = (on) => {
4  on("session.start", async ($, e, next) => {
5    const result = await next(e);
6    await $.command.register({
7      name: "diff",
8      description: "Open the worktree diff in a reusable Neovim split",
9      immediate: true,
10    });
11    return result;
12  });
13  on("command.run", { command: "diff" }, async ($) => {
14    const result = await $.process.run(["agent-diff"], { timeoutMs: 16000 });
15    return {
16      text: (result.exitCode === 0 ? result.stdout : result.stderr).trim(),
17    };
18  });
19};
20