3 ms·
A flake.nix file is somewhat comparable to a package.json file in a NodeJS project. Similar to how package-lock.json records the exact version of packages used
by rgoulter 3y ago
A flake.nix file is somewhat comparable to a package.json file in a NodeJS project.
Similar to how package-lock.json records the exact version of packages used to build a nodejs project, a flake lockfile will record the exact version of nixpkgs (and other nix dependencies) the flake uses.
The other thing a flake.nix file provides is a consistent entrypoint to a codebase. Previously, by convention, projects might have a `default.nix`, but one default.nix might be a different form than another default.nix.
The consistent entrypoint allows for a really nice UX for both referring to other nix codebases, as well as a Docker-like UX for running code which has a flake.nix.