Nix isn't a scripting language in the sense you seem to have in mind. The snippets you saw that looked like Bash most likely
were literally Bash, embedded as multiline strings in Nix.
Nix doesn't have much in common with Haskell.
Nix is a really small language, and you can learn pretty much all of it in a few minutes: https://nixcloud.io/tour/?id=introduction/nix