Fast, Declarative, Reproduble and Composable Developer Environments Using Nix

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • devenv

    Fast, Declarative, Reproducible, and Composable Developer Environments

  • I gave devenv multiple tries, and I am sorry to say there are multiple annoying issues that forced me to give up every time.

    Some of these 200+ issues are unsolved for a fairly long time.

    https://github.com/cachix/devenv/issues

  • biome

    A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • git-hooks.nix

    Seamless integration of https://pre-commit.com git hooks with Nix.

  • > Good luck getting answers on those questions other than "read the source code" and then followed by "no, not that source code, this branch here".

    I experienced a similar situation last week with git-hooks.nix[1], a pre-commit integration for Nix.

    I wanted to run biome[2] checks on my repository during pre-push so I wrote a custom hook because git-hooks.nix has pre-defined integrations with prettier and rome, but not biome.

    Or that's what I thought. I eventually found out that the rome hook is actually referred as "rome" everywhere but calls biome instead[3]. This wasn't documented anywhere, so I opened an issue[4] suggesting to rename the hook to "biome" and keep the former for backwards compatibility reasons.

    As of today, this has been acknowledged by one of the maintainers, whose sole feedback has been to "thumb down" the issue.

    TL;DR: It's not just the documentation, but also the code not doing what you would expect. It also seems there's no means to improve the situation other than just forking the project since there's also clearly some kind of communication problem.

    [1] https://github.com/cachix/git-hooks.nix

  • dotfiles

  • As GP implies, NixOS supports running multiple instances of any service you like, but the way some of the modules are written doesn't make it easy. Thankfully one of the advantages of NixOS is that it's pretty easy to add a configuration module to your personal configuration!

    In general, you can configure systemd yourself through `systemd.services`, where you can write systemd service files ‘directly’ in Nix syntax. Services for which multiple instances make sense often (unfortunately, not always) provide configuration that allows you to specify multiple instances (i.e. their top-level configuration object will be a list or attrset of instance configurations). I've written a little bit about patterns to do this here: https://twey.io/nix-patterns/inputs-and-outputs/

    If you needed, say, multiple instances of Postgres, it's not too challenging to copy-paste the nixpkgs implementation, change it a bit to parameterize the config on (e.g.) a service name for namespacing, then import that module into your NixOS configuration to allow you to define multiple instances. For example, I did this here for the Rainloop email client: https://github.com/Twey/dotfiles/blob/main/nixos/modules/ser...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts