Экосистема Nix
Экосистема Core Nix - это набор технологий, предназначенных для воспроизводимой сборки и декларативного конфигурирования и управления пакетами и системами, а также их зависимостями. Это достигается путем переноса функциональной парадигмы из области программ в область систем с помощью динамического, функционального и ленивого DSL, называемого Nix Language для определения воспроизводимых сборок
Кроме того, существует множество других applications (Extended Nix Ecosystem), разработанных сообществом Nix, использующих и поддерживающих эти основные технологии.
Официальная экосистема
| Компонент | Руководство | Описание | Используйте | Лицензия |
|---|---|---|---|---|
| NixOS | NixOS Manual | Дистрибутив Linux со всеми компонентами, собранными Nix, и, таким образом, поддерживающий воспроизводимое и декларативное управление конфигурацией всей системы, а также атомарное обновление и откат. | Декларативная конфигурация настольных компьютеров, серверов и кластеров | MIT |
| Nixpkgs | Nixpkgs Manual | Крупнейший поддерживаемый сообществом репозиторий пакетов Nix и модулей NixOS; здесь размещаются стандартные выпуски NixOS. | Распространение пакетов Nix и модулей NixOS | MIT |
| Hydra | Hydra Manual | Система непрерывной сборки на базе Nix. | Фермы сборки CI | GPL-3.0 |
| Nix | Nix Manual | Менеджер пакетов, который анализирует выражения Nix, указывающие на воспроизводимую сборку, помещая результат в адрес хранилища с хэшем дерева зависимостей, обходя ад зависимостей и поддерживая многоверсионную установку и откат. | Воспроизводимые сборки и управление пакетами в Linux и Darwin | LGPL-2.1 |
|- ! Component ! Manual ! Description ! Use ! License |- | NixOS | NixOS Manual | A Linux distribution with all components built by Nix, and thus supporting reproducible and declarative system-wide configuration management as well as atomic upgrades and rollbacks. | Declaratively configure desktops, servers & clusters | MIT |- | Nixpkgs | Nixpkgs Manual | The largest community maintained Nix package and NixOS module repository; standard releases of NixOS are hosted here. | Share Nix packages & NixOS modules | MIT |- | Hydra | Hydra Manual | A Nix based continuous build system. | CI build farms | GPL-3.0 |- | Nix | Nix Manual | A package manager that parses Nix expressions specifying reproducible build, putting the result in a store address with a hash of the dependency tree, sidestepping dependency hell and supporting multiversion installs and rollbacks. | Reproducible builds & package management in Linux & Darwin | LGPL-2.1 |}
|
NixOS
Дистрибутив Linux и система конфигурирования, построенная с использованием Nixpkgs |
|
|
Nixpkgs
Большой, поддерживаемый сообществом репозиторий пакетов |
Hydra
Система непрерывной сборки, построенная на базе Nix |
|
Nix
Чистая и функциональная система сборки | |
| style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
A Linux distribution and configuration system built using Nixpkgs. |- | style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
A large, community-maintained repository of packages. | style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%"|
A continuous build system built on Nix. |- | style="text-align: center; border: 1px solid var(--border-color-base); background: var(--background-color-neutral); padding: 1.6rem" width="2%" colspan="2"|
A pure and functional build system. |}
Использование NixOS
Пользователи устанавливают дистрибутив NixOS на свои компьютеры так же, как и любой другой дистрибутив Linux. Они читают о пакетах для установки и параметрах конфигурации в Nixpkgs на сайте https://search.nixos.org и в этой вики. Они используют язык Nix, чтобы декларативно описать в текстовом файле, какие пакеты программ должны быть установлены и как должна быть настроена система. Они запускают 2 программы командной строки в терминале, чтобы преобразовать систему в описанную систему. Они используют систему как любую другую систему Linux.
Users install the NixOS distribution on their computers just as any other Linux distribution. They read about packages to install and configuration options in Nixpkgs via https://search.nixos.org and this wiki. They use the Nix language to declaratively describe in a text file what software packages should be installed and how the system should be configured. They run 2 command line programs in a terminal to transform the system into the described system. They use the system as any other Linux system.
Разработка NixOS
Разработчики NixOS в основном работают над Nixpkgs, чтобы описать в текстовых файлах на языке Nix, как должны быть собраны программные пакеты. После экспертной оценки эти изменения интегрируются в Nixpkgs. Некоторые из этих пакетов предварительно собираются на Hydra, чтобы сократить время обновления для пользователей NixOS.
Developers of NixOS mainly work on Nixpkgs. NixOS development itself is compromised of three large areas as well as some others which are smaller by volume (but no less important). The major ones include packaging, the module system, and documentation.
- Packaging is done in Nixpkgs and is not exclusive to NixOS or even Linux-based platforms. Maintainers of packages which are not exclusive to NixOS (such as tooling required to run the distribution itself) usually take care of multiple platforms although not strictly required.
- The module system is the way in which services running on NixOS are primarily configured. This area stretches from "low-level" configuration such as systemd unit files or providing custom kernel configuration up to configuration file generation for specific services. The module system is the primary way for users to configure NixOS, and lives in the
nixos/subdirector of Nixpkgs.
- Documentation is largely embedded in packaging and module system data, although free-standing markdown files are also contained in the Nixpkgs repository. Documentation also includes maintaining the website, Wiki, and other aspects of the wider ecosystem. The first two categories are almost exclusively Nix language code written in text files, while the latter is a mix of Nix code, markdown files, and various other formats.
All contributions to Nixpkgs, regardless of whether they affect NixOS or not, are subject to peer review before being integrated into Nixpkgs. Many packages alongside documentation and supplementary materials such as ISOs or tarballs are pre built on Hydra to reduce the update time for NixOS users.
Those three categories are largest by contribution volume, however many maintainers also engage in activities surrounding the NixOS foundation, maintaining the infrastructure on which website, Hydra, and other tools run on, or developing tooling required for NixOS.
| Type of development | Location of Development | Examples |
|---|---|---|
| Platform Agnostic Packaging | Nixpkgs | coreutils package, stdenv framework, Libreoffice package |
| Platform Agnostic Tooling | Nixpkgs and various repositories | upstream/default Nix implementation (CppNix), Hydra source code, Nixpkgs merge bot |
| NixOS Tooling | mostly Nixpkgs | nixos-rebuild-ng source code, NixOS Installation ISOs |
| NixOS Module System | Nixpkgs | Display Manager configuration, MySQL (and derivative) database configuration |
| Infrastructure | Infrastructure for this Wiki, NixOS infra | |
| Documentation | This Wiki, stdenv documentation, NixOS IPv6 configuration (visible in the IPv6 section of the NixOS manual), Nixpkgs Contribution Guidelines | |
| Tech Organisation | NixOS RelEng, Nix and NixOS RFCs | |
| Other | NixOS artwork, NixOS (and related) discourse, NixOS Foundation |
See also: Nix organisation repository