Skip to content

additionalNetrcSources doesn't work on 3.9.0+? #135

@name-snrl

Description

@name-snrl

Our team uses determinate nix, we also started using private cachix. The configuration steps for our team are as follows:

1. Install nix

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
  sh -s -- install --determinate \
  --extra-conf "trusted-users = $(whoami)" \
  --extra-conf "extra-trusted-public-keys = name.cachix.org-1:key" \
  --extra-conf "extra-substituters = https://name.cachix.org" \
  --extra-conf "lazy-trees = true"

2. Configure cachix

2.1 Add cachix to config (skip on fresh nix installation)

Replace the old value or add the following configuration options to
/etc/nix/nix.custom.conf:

extra-trusted-public-keys = name.cachix.org-1:key
extra-substituters = https://name.cachix.org
2.2 Configure authentification token
sudo sh <<CMD
echo 'machine name.cachix.org password <auth_token>' >/etc/nix/netrc
mkdir -p /etc/determinate
echo '{
  "authentication": {
    "additionalNetrcSources": [
      "/etc/nix/netrc"
    ]
  }
}' >/etc/determinate/config.json
launchctl kickstart -k system/systems.determinate.nix-daemon
CMD

However, on some machines determinate daemon doesn't create /nix/var/determinate/netrc. For example, this happens with the following versions:

  • nix (Determinate Nix 3.11.2) 2.31.1
  • nix (Determinate Nix 3.9.0) 2.30.2

at the same time, everything works correctly with these versions:

  • nix (Determinate Nix 3.8.2) 2.30.1
  • nix (Determinate Nix 3.7.0) 2.29.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions