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.
(2edf56b02382ee562e95ea7c8d4255effb5821ea75aa05dfc999a50014c71bec)
(f7a72254709f700e2b804c418b1314dc326e4fa492de2375f4e68362dbc1ea46)
(c20912bd59fb8c6108d2209a1547fc79d3c7410dcf7757e995524c41888acc33)
(d331d249796b29c160988be1b99e580924156b0882461f1a5e7fc9caf3506d5c)
(29c0de992ac8f6eb025044bebf8f2cb0bbbf8aad58a3f8bb9e0ed5ea14d4d35e)
(637d4444a0cad3306c927f61814a819a77abd0a9b690539452c1674da6b2ec4f)
# 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