Skip to content

doc: add note about trusted users#9202

Closed
Janik-Haag wants to merge 1 commit intoNixOS:masterfrom
Janik-Haag:master
Closed

doc: add note about trusted users#9202
Janik-Haag wants to merge 1 commit intoNixOS:masterfrom
Janik-Haag:master

Conversation

@Janik-Haag
Copy link
Copy Markdown
Member

Motivation

it took me way too long to figure out why remote builds with just a machine file don't work, esp. since the error message isn't that great and I want to make it easier for other people.

@fricklerhandwerk
Copy link
Copy Markdown
Contributor

fricklerhandwerk commented Oct 21, 2023

What exactly is the issue you ran into? Judging from the change, you seem to be on NixOS, have written to /etc/nix/machines directly and are running the build from your-user, right? What exactly was the error message?

Why would it be different if you had used the module to specify machines?

I'm trying to filter what we really need fixed in the Nix manual. Because we certainly shouldn't mention NixOS at all, as that will just continue confusing people about what's what, where things are really happening, and where to find the right bits of information.

Apparently some interaction is unclear here. We have a note about substituters and trusted-users, if the behavior is the same there we should have such a note for builders as well.

@Janik-Haag
Copy link
Copy Markdown
Member Author

Janik-Haag commented Oct 22, 2023

If I don't have:

  nix = {
    distributedBuilds = true;
    buildMachines = [
      {
        hostName = "aarch64.nixos.community";
        maxJobs = 64;
        sshKey = "/home/janik/.ssh/nix-community-builder";
        sshUser = "janik";
        system = "aarch64-linux";
        supportedFeatures = [ "big-parallel" ];
      }
    ];
  };

in my config and instead just use a machine file I have to be in the local trusted users, otherwise nix just throws a error about no available builders if I also set --max-jobs 0, I don't have the remote builders file in /etc/nix/machines

The NixOS wiki also has it in the trouble shooting section https://nixos.wiki/wiki/Distributed_build#Troubleshooting and it's there for ~3 years now https://nixos.wiki/index.php?title=Distributed_build&oldid=4005

@fricklerhandwerk
Copy link
Copy Markdown
Contributor

So what we really need would be adding the same kind of note to buiders configuration setting as we have for substituters? I think the general problem is that this guide has too much reference documentation that should instead be in the config file section.

@Janik-Haag
Copy link
Copy Markdown
Member Author

Uhm maybe could you send a link to the substituters docs you are referencing, I'm not not familiar.

@fricklerhandwerk
Copy link
Copy Markdown
Contributor

We have a note about substituters and trusted-users, if the behavior is the same there we should have such a note for builders as well.

#9202 (comment)

@Janik-Haag
Copy link
Copy Markdown
Member Author

Yeah something like that would be nice. Also sorry I forgot that you linked it above already, it's been a while 🙈

@fricklerhandwerk
Copy link
Copy Markdown
Contributor

fricklerhandwerk commented Nov 10, 2023

No problem at all. Do you have the time to add that bit in this PR? Should amount to copypaste and fixup.

@Janik-Haag
Copy link
Copy Markdown
Member Author

fixed.

@fricklerhandwerk
Copy link
Copy Markdown
Contributor

fricklerhandwerk commented Dec 2, 2023

Closing in favor of #9526, where the note on trusted-users is incorporated.

@Janik-Haag this is not to dismiss your contribution. In fact, thanks for digging out the issue which would otherwise have gone unnoticed. Also it nudged me to finally make a sweep over the whole topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants