Nixie is currently alpha software, provided as-is with no guarantee. The builder and generated scripts are subject to change, and the current feature set is not to be considered final.
Nixie is a lightweight solution to ship the Nix package manager together with a project repository, regardless of host architecture. It leverages a brand new feature starting with Nix 2.10, which allows the default Nix binary to host a sandboxed Nix store with no privileges.
On macOS, non-root Nix store support is made possible by fakedir, which is shipped with the script as a Universal library.
To "install" Nixie onto your project's Git repository, you need to be running the Nix package manager, preferably with flakes enabled.
Running the nix
script at the root of your repository will automatically determine if you have Nix installed or not. If Nix is installed, it will just redirect the call to your system-wide Nix. It's when it is not installed that the magic happens.
Nixie will automatically download a prebuilt static nix
binary from this repository's CI jobs into your user's cache directory:
On Linux, ~/.cache/nix-static
On macOS, ~/Library/Caches/nix-static
Nixie can also build Nix and its dependencies locally from source code, as a fallback on unsupported platforms.
Subsequent calls to the nix
script will be redirected to that local binary. The name of the repository script determines which Nix command to run: nix
, nix-shell
, nix-env
(unsupported), etc.