Getting started with Determinate
Determinate is an all-in-one Nix toolchain that includes:
- Determinate Nix, a validated and secure distribution of Nix from Determinate Systems that’s configured to be used with…
- FlakeHub, a platform for publishing and discovering Nix flakes, with features like private flakes and FlakeHub Cache.
You can install Determinate in a variety of platform-specific ways.
Platform support
Determinate is supported on these platforms:
Operating system | Architecture | Supported |
---|---|---|
macOS | Apple Silicon | ✅ |
macOS | Intel | ✅ |
Linux (including SELinux) | x86-64 | ✅ |
Linux (including SELinux) | aarch64 | ✅ |
Installing Determinate
This table shows you how you should install Determinate Nix depending on your situation:
Situation | How to install |
---|---|
Linux but not using NixOS | Determinate Nix Installer |
macOS but not using nix-darwin | Determinate Nix Installer or Determinate.pkg |
Linux and using NixOS | The NixOS module provided by the determinate flake |
macOS and using nix-darwin | The nix-darwin module provided by the determinate flake |
Using Determinate Nix Installer
If you use…
- macOS (not nix-darwin) or
- Linux (not NixOS)
…you can install Determinate using the Determinate Nix Installer with the --determinate
flag:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install --determinate
Using the determinate
flake
If you use nix-darwin or NixOS you can install Determinate using the determinate
flake.
To add the flake as a flake input:
{
inputs.determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1";
}
We recommend not using a follows
directive for Nixpkgs (inputs.nixpkgs.follows = "nixpkgs"
) in conjunction with the determinate
flake, as it leads to cache misses for artifacts otherwise available from FlakeHub Cache.
NixOS
If you’re a NixOS user, you can quickly set up Determinate Nix using the nixosModules.default
module output from the determinate
flake.
Here’s an example NixOS configuration:
{
inputs.determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2405.0";
outputs = { determinate, nixpkgs, ... }: {
nixosConfigurations.my-workstation = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# Load the Determinate module
determinate.nixosModules.default
];
};
};
}
nix-darwin
If you’re a nix-darwin user on macOS, you can quickly set up Determinate using the darwinModules.default
module output from the determinate
flake.
Here’s an example nix-darwin configuration:
{
inputs.determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1";
inputs.nix-darwin.url = "github:LnL7/nix-darwin";
outputs = { determinate, nix-darwin, ... }: {
darwinConfigurations.my-workstation-aarch64-darwin = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
# Load the Determinate module
determinate.darwinModules.default
];
};
};
}
Determinate.pkg
You can install Determinate on macOS using Determinate Systems’ provided .pkg
file.
You can download and run it by clicking here.
Download and run the latest Determinate package from install.determinate.systems.
The Determinate package is fully signed and notarized. Re-running the installer is safe and upgrades Determinate in place.
Deploying to a fleet with Mobile Device Management (MDM)? See Deploy Determinate with MDM.
Log in to FlakeHub
Once you’re set up with Determinate Nix, you can log in to FlakeHub using Determinate Nixd:
determinate-nixd login
By default, the login
command triggers a FlakeHub login flow that includes generating a JSON Web Token (JWT) in the FlakeHub UI and copy-pasting it into your terminal.
Once logged in, you can use private flakes and FlakeHub Cache.
Determinate can log in automatically on a variety of platforms, including Amazon Web Services using Secure Token Service (STS), GitHub Actions, and GitLab CI
You can now download private flakes and artifacts from your private binary cache.