Getting Nix onto legacy distributions can be difficult and the official installer is not always a viable option, especially when considering reproducibility and automation.
This approach is different from others in that we:
Package using distribution-native packaging formats
(deb
/rpm
). And use these packages to manage
systemd and environment integrations.
Create a /nix/store imperatively as a postinstall hook. This uses a prepopulated Nix store embedded inside the distribution-native packaging format.
Properly cleans up after uninstallation. We use package manager hooks to cleanly remove any traces of Nix post removal.
To achieve a reproducible setup for these distributions that doesn’t rely on pulling files from the internet at install-time.
These installer packages are intended to be used in a one-shot fashion to bootstrap the Nix installation, and then let Nix deal with managing itself from that point on.
(3e5c8e1b1fcd1eb285a5d1488e2b2e621126c4ae6ceb5ff50c3b2329040bfefb)
(6697c4ff75aaab29b36d799151f95f7246f38584b6f37a04d38ed719377ca262)
(9f45b3e835482d536503371ea44ab7223fb3b623de5fb664a25448f9ab9fd5aa)
(2f5aca9fe7a1fa7acb6f0be20e55962ced8bb308a848373b955b98c383a6b403)
(20a80d96bc30143a117b58b45e9fc8930b7bd98ba3502d814a181b1f4eb6b755)
(abc8cb20a9386b23ec44f061e2b3ed2dd4a5c1299aaf9ffe8d70b80b97c8cee4)
# Remote flake
$ nix build github:nix-community/nix-installers#deb
$ nix build github:nix-community/nix-installers#pacman
$ nix build github:nix-community/nix-installers#rpm
# In a cloned repository
$ nix build .#deb
$ nix build .#pacman
$ nix build .#rpm
# In a cloned repository
$ nix-build ./. -A deb
$ nix-build ./. -A pacman
$ nix-build ./. -A rpm