Skip to content

Commit

Permalink
docs: clarify on flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Feb 9, 2025
1 parent ebaa744 commit 73409f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
11 changes: 3 additions & 8 deletions docs/guides/using-with-flake-parts.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
If you're familiar with the Nix language and ecosystem, `devenv` can be used without the `devenv` CLI by integrating into [Nix Flakes](https://www.tweag.io/blog/2020-05-25-flakes/) using [flake-parts](https://flake.parts).

Using a `devenv` configuration in flakes is useful for projects that need to define other Nix flake features in addition to the development shell.
Additional flake features may include the Nix package for the project, or NixOS and Home Manager modules related to the project.
Using the same lock file for the development shell and other features ensures that everything is based on the same `nixpkgs`.

A Nix flake needs to consist of at least the input declarations from `devenv.yaml`, as well as the `devenv` configuration that you would usually find in `devenv.nix`.
`flake.lock` is the lock file for Nix flakes, the equivalent of `devenv.lock`.
Many experienced Nix users prefer to use [Nix flakes](https://nixos.wiki/wiki/Flakes),
although devenv is considered a superior interface since it's way simpler,
but lacks integration with existing tooling.

## Getting started

Expand Down
13 changes: 3 additions & 10 deletions docs/guides/using-with-flakes.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
If you're familiar with the Nix language and ecosystem, `devenv` can be integrated with [Nix Flakes](https://www.tweag.io/blog/2020-05-25-flakes/).

You can define your own packages, NixOS and Home Manager modules, and benefit from the `devenv` development features.
The development shell will share the same inputs and lock file as all the other outputs of your flake, ensuring that your entire project is using the same `nixpkgs` revision.

With flakes, you no longer need dedicated configuration files for `devenv`:

* The inputs from `devenv.yaml` are replaced by the flake's inputs.
* `devenv.nix` becomes a `devShell` module in `flake.nix`.
* `devenv.lock` is replaced by `flake.lock`.
Many experienced Nix users prefer to use [Nix flakes](https://nixos.wiki/wiki/Flakes),
although devenv is considered a superior interface since it's way simpler,
but lacks integration with existing tooling.

## Getting started

Expand Down

0 comments on commit 73409f3

Please sign in to comment.