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

 

History

396 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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/3";
}

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 = {
    nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0";
    determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/3";
  };

  outputs = { self, ... }@inputs {
    nixosConfigurations.my-workstation = inputs.nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        # Load the Determinate module
        inputs.determinate.nixosModules.default
      ];
    };
  };
}

nix-darwin

Important

Determinate's nix-darwin module does not install Determinate Nix for you; consult our installation instructions for that. Instead, this module ensures that nix-darwin and Determinate Nix are compatible and provides some useful helpers for configuring Determinate Nix, including Determinate Nixd.

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 applying the determinate nix-darwin module and setting determinateNix.enable = true; if not, Determinate Nix does not work properly. Here's an example nix-darwin configuration that would be compatible with Determinate Nix:

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

  outputs = { self, ... }@inputs: {
    darwinConfigurations."my-username-aarch64-darwin" = inputs.nix-darwin.lib.darwinSystem {
      system = "aarch64-darwin";

      modules = [
        # Add the determinate nix-darwin module
        inputs.determinate.darwinModules.default

        # Configure the determinate module
        ({ config, lib, ... }: {
          # Let Determinate Nix handle Nix configuration rather than nix-darwin
          determinateNix = {
            enable = true;

            # Other 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 the customSettings attribute for that. Here's an example:

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

  outputs = { self, ... }@inputs: {
    darwinConfigurations."my-username-aarch64-darwin" = inputs.nix-darwin.lib.darwinSystem {
      system = "aarch64-darwin";

      modules = [
        # Add the determinate nix-darwin module
        inputs.determinate.darwinModules.default

        # Configure the determinate module
        ({ config, lib, ... }: {
          determinateNix = {
            # Enable Determinate Nix to handle your Nix configuration rather than nix-darwin
            enable = true;
            # Custom settings written to /etc/nix/nix.custom.conf
            customSettings = {
              flake-registry = "/etc/nix/flake-registry.json";
              sandbox = true;
            };
          };
        })
      ];
    };
  };
}

You can also manage Determinate Nixd's configuration using the determinateNixd attribute. This automatically creates a /etc/determinate/config.json file for you. Here's an example:

{
  determinateNix = {
    enable = true;
    determinateNixd = {
      garbageCollector.strategy = "disabled";
      authentication.additionalNetrcSources = [
        "/path/to/custom/netrc"
      ];
    };
  };
}

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

Contributors 11

Languages