nix-flake-examples/README.md

24 lines
733 B
Markdown
Raw Normal View History

2023-12-19 21:42:08 +00:00
Various examples for different nix flakes, useful for `nix develop`
2024-11-01 21:21:02 +00:00
Usage
-----
Several options for using these flakes:
1. Copy the flake.nix file locally, use nix develop
2. Use in place with nix develop. For example, for hugo:
```sh
$ nix develop https://git.lerch.org/lobo/nix-flake-examples/archive/master.tar.gz?dir=/hugo
```
3. Use with [devenv](https://devenv.sh/). Again, hugo example. Add this to `.envrc`:
```sh
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
fi
use flake 'https://git.lerch.org/lobo/nix-flake-examples/archive/master.tar.gz?dir=/hugo'
```