nix-book/source/recipes/ad-hoc/main.adoc0
Amy de Buitléir 5835a15a40 temp
2025-09-16 13:38:20 +01:00

21 lines
438 B
Text

= Ad hoc environments
== Access a top level package from the Nixpkgs/NixOS repo
....
$# start-shell nix shell nixpkgs#cowsay <<EOL
$ cowsay "moo"
$# EOL
....
== Access a flake
In this example, we will use a flake defined in a remote git repo.
However, you can use any of the flake reference styles defined in <<#flakeref>>.
....
$# start-shell nix shell git+https://codeberg.org/mhwombat/hello-flake <<EOL
$ hello-flake
$# EOL
....