NixOS / NixOS/nix

Set priority for ssh and file cache substitutors

Open
#5,166 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
17.7k
Forks
2k
Avg merge
1d 16h
Merged PRs (30d)
80

Description

Is it possible to overwrite or set ssh and file substitutors priority?
For https it is possible to do so with ?priority=n

My exact problem is:
I have 3 substitutors in nix.conf. https://, ssh://, file://. Then I do nix-build it always choose ssh:// substitutor. If I remove ssh:// from the list it starts to choose file://. So how to force it to prioritize file:// over ssh:// ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to nix.conf and the nix-build substitutor selection path; start by tracing how https:// applies ?priority=n and where ssh:// and file:// are ordered. Done means users can configure an explicit priority for ssh:// and file:// so file:// is selected ahead of ssh://, verified with the described nix-build setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.