Skip to content

Nix packages and services for projects supported through the NGI program

License

Notifications You must be signed in to change notification settings

ngi-nix/ngipkgs

Repository files navigation

NGIpkgs

Nix is an open source build system, configuration management system, and mechanism for deploying software, focused on reproducibility. It is the basis of an ecosystem of exceptionally powerful tools. Nixpkgs is the largest, most up-to-date software repository in the world. NixOS is a Linux distribution that can be configured fully declaratively, with unmatched flexibility.

Many software projects funded by the Next Generation Internet (NGI) initiative of the European Commission through the NLnet Foundation are not mature enough to distribute through Nixpkgs, or cannot be included in Nixpkgs for technical reasons. This repository makes such projects available as

  • Package recipes compatible with Nixpkgs
  • Configuration modules compatible with NixOS

and provides automatically tested example NixOS configurations.

NGIpkgs was created as part of Summer of Nix, organised by the NixOS Foundation.

How to use software from NGIpkgs

This is what you can do with software from NGIpkgs:

  • Run standalone programs locally with Nix
  • Use libraries or tools to build software with Nixpkgs
  • Deploy services to machines running NixOS

In order to do that:

It will help you to go more quickly if you learn to:

Structure of NGIpkgs

The software in NGIpkgs can be divided into two broad categories: Nix packages, and NixOS modules.

.
├── flake.nix
├── pkgs
│   └── by-name
│       └── …            # directories of packages
├── projects
│   ├── <project-name>   # names matching those at https://nlnet.nl/project
│   │   ├── default.nix  # project definition
│   │   └── …            # files of the project (e.g. NixOS module, configuration, tests, etc.)
│   └── default.nix      # imports all projects 
├── README.md            # this file
└── …

Nix packages can theoretically be built and run on any operating system that runs Nix. The output of building a Nix package is often a library or executable, including its dependencies. In NGIpkgs, these packages are all contained in the pkgs directory. For simple package definitions, we use pkgs/by-name/<pname>/package.nix, inspired by Nix RFC 140.

Corresponding to projects funded by NGI through NLnet there are per-project subdirectories within the projects directory. These per-project directories contain a default.nix which

  • Picks packages associated with the project from those defined in pkgs and Nixpkgs,
  • Exposes NixOS modules, tests, and configurations which are also contained in the per-project directory,
  • May contain additional metadata about the project.

NixOS modules are components that can be easily integrated into a NixOS configuration. Many of them represent services that map to one or more systemd services that are designed to run on NixOS. These modules are ready to be deployed to a NixOS system, such as a container, virtual machine, or physical machine. Example configurations found in the corresponding per-project directory are a good starting point for anyone interested in using these modules, and are sure to work because they are also used for testing.

Continuous builds of packages with Buildbot

All packages in the main branch of NGIpkgs are automatically built by a Buildbot server. The results of these builds can be found at https://buildbot.ngi.nixos.org/#/projects/1

Reasoning for creation of the NGIpkgs monorepo

  • Users can discover NGI projects on an overview page and use them immediately.
  • Many software packages are research projects that would not make sense to distribute through Nixpkgs.
  • The developers get a unified code structure, CI & CD tooling, and a common pull request and issue tracker which facilitates reviews.
  • The funding organizations get an overview of the packaging situation.

Contributing to NGIpkgs

Please see CONTRIBUTING.md