Add shell.nix example

This commit is contained in:
Oliver Davies 2025-08-15 09:29:23 +01:00
parent a7047d27f3
commit c69da009ff
2 changed files with 19 additions and 1 deletions

View file

@ -89,12 +89,19 @@ Ecosystem of tools - e.g. Home Manager.
[[dev_shells]]
= What are dev shells?
[,nix]
----
# shell.nix
include::../shell.nix[]
----
[[direnv]]
= dev shells and direnv
Using a local flake:
[source,bash]
[,bash]
----
use flake .
----

11
shell.nix Normal file
View file

@ -0,0 +1,11 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
packages = with pkgs; [
php
phpPackages.composer
phpactor
];
}