Nix Flake

Set up a reproducible Nix development environment for any Git repository — create a flake.nix with a devshell so `nix develop` provides the project's toolchain (cargo/clippy, go/gopls, python/pytest/black, node, ...) without global installs, fix a missing or broken flake.nix, port a legacy shell.nix/default.nix to a flake, diagnose `nix develop` errors such as "does not contain a flake.nix", enforce a policy that every repo must have a flake.nix, or migrate an existing flake away from flake-utils. Use this skill whenever the user wants a project's environment reproducible with Nix, asks for a devshell/dev shell setup, mentions flake.nix or nix develop while working on a project, or asks to get set up hacking on a freshly cloned repo — and proactively check whether the Git repo you are working in has a flake.nix, offering to add one when missing. Writes flakes using the official default template pattern (builtins.mapAttrs over nixpkgs.legacyPackages, never flake-utils) and verifies them by evaluation and build

atvari-eu 8e88661 2 files · 14.2 KB Updated

File contents

atvari-eu/nix-skills/tree/main/skills/nix-flake commit 8e88661f09

Frequently asked questions

npx skillmds@latest add atvari-eu/nix-flake