feat: introduce development shell

flakes are not stable yet, community is divided but maintaining both
flake and a set of dependencies in our scripts is hard.
So provide a nix-shell that fetches the nixpkgs recorded in the
flake.lock to keep a single source of truth

doc: updated the doc to advise `nix-shell -A dev`
This commit is contained in:
teto
2026-02-25 09:42:47 +01:00
committed by Austin Horstman
parent 58330fd08d
commit 4c4fd4ed6b
3 changed files with 16 additions and 2 deletions

View File

@@ -8,6 +8,18 @@ let
name = "home-manager-source";
};
nixpkgs = (
import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
n = lock.nodes.nixpkgs.locked;
in
fetchTarball {
url = "https://github.com/${n.owner}/${n.repo}/archive/${n.rev}.tar.gz";
sha256 = n.narHash;
}
) { }
);
in
rec {
docs =
@@ -32,5 +44,7 @@ rec {
nixos = import ./nixos;
lib = import ./lib { inherit (pkgs) lib; };
dev = nixpkgs.callPackage ./home-manager/devShell.nix { };
inherit path;
}