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.
(d6cc93d47e16a64facb1fe1630cbf5b8be85f2f22e3a40d5fbd0b0b576bb5b63)
(f1a55f1f26c1d9127762e1659c5562bfe3b5bc8745ae2e31c4524f134f70100b)
(6dc5ebb119ee67cd1e73fe54f2c831f4983a26755339359835bb84457f64a98b)
(c34f8ad59dc46dbe74715e6934c54c05d62ad60ec32a902188f2ba4091f800b7)
(98430f6b5e7c188d818aa182aa3d177ab6d858e12a090c2f50c1fdb48422c1e0)
(d5af48e065505401202d4ec46c36f226e8c157006bb0e6c5e00f56a30fea8358)
# 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