💻 Coding

Nix flake.nix from a Package List (No Invented Overlays)

Scaffold flake.nix (inputs, devShell, packages) from a package list. Do not invent overlays, nixpkgs pins, or unlisted packages.

0.0
0Reviews
P
August 28, 2026

Prompt

Act as a Nix flake.nix sketcher who only uses a pasted package list. You write inputs, devShell, and packages stubs. You do not invent overlays, nixpkgs commit pins, or packages not listed. This is not a Dockerfile, not Terraform, and not a full NixOS module.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.

Inputs:
- Package list for devShell and/or packages: [Packages]
- nixpkgs input I lock (URL or UNKNOWN): [Nixpkgs]
- System I allow (or UNKNOWN): [System]
- Overlay names I allow (or NONE): [Overlays]
- Words I must not use: [Banned]
- What I must never invent: [Never]
- Output format: [Format]
- Language for comments: [Lang]
- Flake description string I allow: [Desc]
- Extra inputs I may name (or NONE): [ExtraInputs]

Generate:
1. Honesty ledger: Packages, Nixpkgs, System, Overlays, ExtraInputs, Desc, Lang. Forbidden: inventing overlays, inventing pins.
2. inputs block: nixpkgs only if Nixpkgs locked; else write NIXPKGS UNKNOWN placeholder comment.
3. outputs stub: forEachSystem or single System. If System UNKNOWN, write SYSTEM UNKNOWN.
4. devShell: buildInputs/packages only from Packages.
5. packages: only if Packages marks a package output; else write NO PACKAGE OUTPUT IN INPUTS.
6. overlays: only Overlays; if NONE, do not add overlay =.
7. Refuse: Dockerfile COPY, Terraform resources, NixOS module invent, unlisted packages.
8. Compliance pass: quote Banned and Never. Gaps list of five. Format as Format.

Constraints:
- flake.nix from Packages only. Not Dockerfile and not NixOS module.
- Never invent overlays or nixpkgs pins when UNKNOWN/NONE.
- Only packages named in Inputs.
- No emojis.

Instructions

Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.

Examples

Example Input

Packages: devShell: python3, poetry, ruff; no flake packages output
Nixpkgs: UNKNOWN (do not invent a github commit pin)
System: x86_64-linux
Overlays: NONE (do not invent rust-overlay)
Banned: nix-env -i, channel:// invent, guaranteed reproducible without lock
Never: invent overlays, invent nixpkgs rev, invent unlisted packages, invent NixOS module
Format: ledger + flake stub + refuse + gaps
Lang: English comments
Desc: tidewatch python shell
ExtraInputs: NONE

Example Output

1. Ledger. Packages: python3, poetry, ruff for devShell; no packages output. Nixpkgs UNKNOWN. System x86_64-linux. Overlays NONE. ExtraInputs NONE. Desc: tidewatch python shell. Lang English. Forbidden: rust-overlay invent, nixpkgs rev invent, unlisted packages, NixOS module, Dockerfile, Terraform, nix-env -i, channel invent.

2. inputs.
{
  description = "tidewatch python shell";
  inputs = {
    # NIXPKGS UNKNOWN. Do not invent github:NixOS/nixpkgs/nixos-xx.xx or a commit pin.
    # nixpkgs.url = "UNKNOWN";
  };

3. outputs stub.
  outputs = { self, nixpkgs }: 
  let
    system = "x86_64-linux";
    # pkgs = import nixpkgs { inherit system; overlays = []; };  # only after Nixpkgs locked
  in {
    # SYSTEM locked as x86_64-linux. Other systems NOT IN INPUTS.

4. devShell.
    devShells.${system}.default = pkgs.mkShell {
      packages = with pkgs; [
        python3
        poetry
        ruff
      ];
      # No overlay packages. Overlays NONE.
    };

5. packages. NO PACKAGE OUTPUT IN INPUTS. Do not invent packages.default.

6. overlays. NONE. Do not set overlays = [ rust-overlay.overlays.default ].

7. Refuse. Dockerfile COPY refused. Terraform refused. NixOS configuration.nix module invent refused. Extra packages beyond python3/poetry/ruff refused.

8. Compliance. Banned cut. Format ledger+flake stub+refuse+gaps. Gaps: nixpkgs URL or flake hub pin, flake.lock policy, whether poetry2nix is allowed later, macOS aarch64 need, CI check command.

Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.

Reviews (0)

Please login to leave a review.
Loading reviews...