nix-initlisted
Install: claude install-skill atvari-eu/nix-skills
# Nix Init
[nix-init](https://github.com/nix-community/nix-init) scaffolds a complete Nix
package from a repository URL: it picks the fetcher, prefetches the source and
dependency hashes via nurl, infers the build system (Rust, Go, Python) and its
dependencies, and detects the license.
The generated file is a strong starting point, not a finished package — upstream
warns that tweaks are usually required. Always verify the result before handing
it back (see Verification).
## Running nix-init
Check if `nix-init` is on PATH first. If not, run it through nix:
```bash
nix run nixpkgs#nix-init -- <args> # latest packaged release
```
## Non-interactive invocation
Agents cannot answer nix-init's fuzzy interactive prompts, so always pass
`--headless`. It requires `--url`; everything else gets inferred unless you
specify it explicitly.
```bash
nix run nixpkgs#nix-init -- --headless \
-u 'https://github.com/owner/repo' \
--overwrite=true \
/path/to/package.nix
```
### Flags worth knowing
- `-u/--url` — **always pass full HTTPS URLs** (`https://github.com/owner/repo`,
`https://gitlab.com/...`, `https://codeberg.org/...`). Short forms like
`github:owner/repo` get mangled into an invalid `git+github:` fetcher and fail.
- `--rev` + `-V/--version` — pin a specific tag and its version. Pass both
together or neither: `-V 1.2.3` without `--rev` leaves the source pinned to
the *latest* tag while claiming version 1.2.3. With neither, nix-init tracks
the latest rel