Skip to content

Determinate is Nix for the enterprise. An end-to-end experience of using Nix, from installation to collaboration to deployment.

Notifications You must be signed in to change notification settings

DeterminateSystems/determinate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Determinate

Determinate is Nix for the enterprise. It provides an end-to-end experience around using Nix, from installation to collaboration to deployment. Determinate has two core components:

You can get started with Determinate in one of two ways:

Situation How to install
Linux but not using NixOS Determinate Nix Installer
macOS Determinate Nix Installer
Linux and using NixOS The NixOS module provided by this flake

Installing using the Determinate Nix Installer

macOS users, including nix-darwin users, should install Determinate using Determinate.pkg, our graphical installer.

Linux users who are not on NixOS should use the Determinate Nix Installer with the --determinate flag:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
  sh -s -- install --determinate

Linux users who are on NixOS should follow the instructions below.

Installing using our Nix flake

If you use NixOS you can install Determinate using this Nix flake. To add the determinate flake as a flake input:

{
  inputs.determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
}

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.

You can quickly set up Determinate using the nixosModules.default module output from this flake. Here's an example NixOS configuration for the current stable NixOS:

{
  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
      ];
    };
  };
}

nix-darwin

If you use nix-darwin to provide Nix-based configuration for your macOS system, you need to disable nix-darwin's built-in Nix configuration mechanisms by setting nix.enable = false; if not, Determinate Nix does not work properly. Here's an example nix-darwin configuration that would be compatible with Determinate Nix:

{
  inputs.determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0";
  inputs.nix-darwin = {
    url = "https://flakehub.com/f/nix-darwin/nix-darwin/0";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0";

  outputs = { determinate, nixpkgs, ... }: {
    darwinConfigurations."my-username-aarch64-darwin" = inputs.nix-darwin.lib.darwinSystem {
      inherit system;
      modules = [
        ({ ... }: {
          # Let Determinate Nix handle Nix configuration rather than nix-darwin
          nix.enable = false;

          # Other nix-darwin settings
        })
      ];
    };
  };
}

While Determinate Nix creates and manages the standard nix.conf file for you, you can set custom configuration in the /etc/nix/nix.custom.conf file, which is explained in more detail in our documentation. If you'd like to set that custom configuration using nix-darwin, you can use this determinate flake for that. Here's an example nix-darwin configuration that writes custom settings:

{
  inputs.determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0";
  inputs.nix-darwin = {
    url = "https://flakehub.com/f/nix-darwin/nix-darwin/0";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0";

  outputs = { determinate, nixpkgs, ... }: {
    darwinConfigurations."my-username-aarch64-darwin" = inputs.nix-darwin.lib.darwinSystem {
      inherit system;
      modules = [
        # Add the determinate nix-darwin module
        inputs.determinate.darwinModules.default
        ({ ... }: {
          # Let Determinate Nix handle Nix configuration rather than nix-darwin
          nix.enable = false;

          # Custom settings written to /etc/nix/nix.custom.conf
          determinate-nix.customSettings = {
            flake-registry = "/etc/nix/flake-registry.json";
          };
        })
      ];
    };
  };
}

About

Determinate is Nix for the enterprise. An end-to-end experience of using Nix, from installation to collaboration to deployment.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published