Haskell Nix template

I’ve been developing Haskell projects using a combination of the following which I really enjoy using,

  • Nix (for reproducible dev environment)
  • Nix Flakes (improved workflow in Nix, especially for pinning)
  • VSCode + haskell-language-server (for IDE support)
  • ormolu for autoformatting
  • Relude as prelude
  • ghcid for quick reloading

So I decided to create a Git template for re-use in future Haskell projects, and thought it may be of interest to others.

The README is self-sufficient in that you should be able to get started on all three platforms (For Windows, WSL2 + the Remote - WSL VSCode extension is required).


This template now works on M1 Mac as well.


The bulk of Nix in this template have recently been moved to a flake-parts module of its own: https://github.com/srid/haskell-flake

1 Like