Install Determinate on NixOS
On NixOS, you install Determinate by adding a module to your system configuration rather than by running Determinate Nix Installer.
The module comes from the determinate flake.
Determinate Systems offers both Amazon Machine Images (AMIs) and ISO images running NixOS with Determinate Nix pre-installed.
Add the Determinate module
Add the determinate flake as an input to your NixOS configuration and include its nixosModules.default output in your system’s modules.
Here’s an example configuration:
{
inputs.determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0";
outputs = { determinate, nixpkgs, ... }: {
nixosConfigurations.my-workstation = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# Load the Determinate module
determinate.nixosModules.default
];
};
};
}If you don’t yet have a NixOS configuration, we recommend creating one using one of Determinate Nix’s flake templates:
nix flake init --template "https://flakehub.com/f/DeterminateSystems/flake-templates/0#nixos"Follow the instructions in the welcome text to get started.
Switch to the new configuration
Pass two extra flags when you run nixos-rebuild for the initial configuration switchover:
sudo nixos-rebuild \
--option extra-substituters https://install.determinate.systems \
--option extra-trusted-public-keys cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM= \
--flake ... \
switchThese flags configure Nix to use install.determinate.systems as an additional binary cache so that you don’t have to build Determinate Nix yourself.
Upgrade Determinate Nix
If you’re using a version of Determinate Nix older than 3.6.0, you can pass --option extra-substituters https://install.determinate.systems to upgrade to version 3.6.0 or later without building.
Once you’re on Determinate Nix 3.6.0 or later, you don’t need to configure any extra substituters to upgrade.
Other installation methods
To install Determinate on macOS, Linux, or Windows Subsystem for Linux (WSL), see the quick start. To install Determinate on a fleet of machines using Mobile Device Management (MDM), see our dedicated MDM guide.