Please describe your proposed solution.
Problem
NixOS allows you to declare what applications you want to install and run simply by enabling an option, i.e. putting in your configuration something like:
gitlab.enable = true;
This is possible thanks to the nixpkgs repository, which is a substantial collection of Nix derivations and NixOS modules that is continuously tested together and built via a public cache. This allows user to avoid rebuilding every derivation from scratch each time they want to install something.
This situation is not so good regarding Cardano-related applications. Often NixOS modules are missing and a central cache is lacking. When deploying environments needed by DApps, developers often encounter that some services lack modules, and even when they are present they are not tested together with other modules.
Solution
- Write more NixOS modules for applications that don’t provide them, and make them upstream whenever possible. If the application isn’t even packaged using Nix, then proceed to package it, possibly as a Nix flake.
- Create a new flake that will collect pinned versions of these modules or will directly contain them if it’s not possible, providing support upstream.
- Write the above mentioned “super modules” that enable opinionated, customizable service subsets to work together.
- Write NixOS tests (a way to test NixOS configurations on virtual machines on CI).
- Populate a cache to make installations faster for people using these modules.
For instance 3. would allow people to just put in their configuration
cardanoNix = {
network = “preview”;
indexers.blockfrost.enable = true;
};
And it would automatically install and configure a Cardano node, a postgres database, cardano-db-sync and blockfrost instance. Everything is configured to work together (database name, users permissions, node socket, etc…)
Market
Developers and application builders deploying NixOS servers to run Cardano-related applications like nodes, indexers, and so on.
How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
Intended Challenge – OSDE: Open Source Dev Ecosystem
Challenge Question – "Can we build a community-owned Open-Source Ecosystem that’s commercially viable to drive growth, increase opportunities, and increase project visibility for the whole Cardano Community?"
What does this proposal entail?
NixOS has many advantages, but it has a very steep learning curve. Although all the applications by IOG provide NixOS modules, many other third-party applications don’t provide them. Using NixOS is easy when modules already exist but writing them requires expertise and not all developers have ample bandwidth and ability for this.
This proposal entails greater and easier NixOS support that will lead more developers to deploy their Cardano applications using NixOS and benefiting from its inherent advantages.
How does this project make it easier to build on Cardano?
This project improves the state of Cardano-related NixOS modules, making it easier for developers to build on Cardano. NixOS offers several advantages, but its complexity often makes it inaccessible. We will improve the state of NixOS modules as outlined thereby greatly simplifying the process of deploying environments needed for DApps to operate efficiently and reliably. Our modules and "super modules" will tie together services and dependencies seamlessly, increasing the speed and ease of deployment of production DApps and lowering barriers to entry.
How do you intend to measure the success of your project?
We will evaluate the success of our configurations project in several important ways:
Quantitative Measures
Number of Modules Created – The quantity of new NixOS modules and 'super modules' we create will correspond to the variety of supported applications, and subsequently the benefit to developers.
Usage Metrics – We will monitor the usage of our modules.
Qualitative Measure
Feedback from Developers – We will actively seek out feedback from developers to understand how our project impacts their work. Feedback and suggestions for improvements will help guide our future work here.
Speed of Deployment – We will assess the improvements for developers deploying environments using our modules versus previous methods.
Please describe your plans to share the outputs and results of your project?
We will share the progress and outcomes of our configurations as effectively and transparently as possible using the typical channels:
- Dedicated GitHub Repository – As an open-source code base observable and usable by the community - our main project output
- Community Updates – We'll regularly update the Cardano community on our progress and milestones through our social channels and the typical Catalyst channels
- Compliance and Documentation – MLabs has participated heavily in Catalyst in the past and has a strong track record of providing transparent and precise progress reports that are publicly available.