Thank you for the hints, @waffle8946!
This works:
{
description = "A flake that loads some packages";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
devShells.default = pkgs.mkShellNoCC {
packages = with pkgs; [
python312
sqlite
ffmpeg
nodejs
];
};
}
);
}
But nix develop
gives me a bash
shell just like nix-shell
does.
From nix develop --help
:
nix develop - run a bash shell that provides the build environment of a derivation
For me, a zsh
user, the benefit of nix shell
over nix-shell
is exactly that it respects my user’s shell shell configuration and creates a zsh
shell for zsh
users. But getting zsh
is apparently not possible without workarounds: