seanhess / hyperbole

Haskell interactive serverside web framework inspired by HTMX
Other
95 stars 6 forks source link

Provide dev environment with nix #17

Closed cgeorgii closed 4 months ago

cgeorgii commented 4 months ago

Hey @seanhess, while messing around with hyperbole locally, I setup a local dev enviroment with nix for the project. Would you be interested in having it in the repository?

The main benefit would be to enable nix users (and also those willing to install it) to start developing with one command: nix develop. Nix has a lot of other benefits, too, but this is the one I'm interested in the most.

Dev environment details

The environment provides:

This environment would, of course, be optional. One could still install dependencies manually.

Installing nix

Nowadays, installing nix is usually as simple as:

$ sh <(curl -L https://nixos.org/nix/install) --daemon

More info can be found in the official installation page.

A base for CI

This development environment could also be used as the basis for CI, since nix flake check would run all the checks (formatting, linting, testing) with basically no extra setup required.