sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
# restart terminal session
nix --version
nix-shell -p cowsay
cowsay "hello, world!"
exit
create shell.nix
and add the following to it.
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
packages = [
pkgs.cowsay
];
}
then fire the command
nix-shell