about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2023-06-07 12:39:27 +1000
committerMichael Hoang <enzime@users.noreply.github.com>2023-07-06 21:32:08 +1000
commit285f5e858eb204ecf08a60c40a99aee1d2dc7bd1 (patch)
tree05716c752d412a11851579ff016359f11c6c9ee4 /doc
parentf292b4964cb71f9dfbbd30dc9f511d6165cd109b (diff)
darwin.builder: use port 31022 by default
Diffstat (limited to 'doc')
-rw-r--r--doc/builders/special/darwin-builder.section.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/builders/special/darwin-builder.section.md b/doc/builders/special/darwin-builder.section.md
index b5b6ab8971e98..7c5c38bf85eee 100644
--- a/doc/builders/special/darwin-builder.section.md
+++ b/doc/builders/special/darwin-builder.section.md
@@ -4,9 +4,6 @@
 
 This requires macOS version 12.4 or later.
 
-This also requires that port 22 on your machine is free (since Nix does not
-permit specifying a non-default SSH port for builders).
-
 You will also need to be a trusted user for your Nix installation.  In other
 words, your `/etc/nix/nix.conf` should have something like:
 
@@ -50,12 +47,21 @@ To delegate builds to the remote builder, add the following options to your
 ```
 # - Replace ${ARCH} with either aarch64 or x86_64 to match your host machine
 # - Replace ${MAX_JOBS} with the maximum number of builds (pick 4 if you're not sure)
-builders = ssh-ng://builder@localhost ${ARCH}-linux /etc/nix/builder_ed25519 ${MAX_JOBS} - - - c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUpCV2N4Yi9CbGFxdDFhdU90RStGOFFVV3JVb3RpQzVxQkorVXVFV2RWQ2Igcm9vdEBuaXhvcwo=
+builders = ssh-ng://builder@linux-builder ${ARCH}-linux /etc/nix/builder_ed25519 ${MAX_JOBS} - - - c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUpCV2N4Yi9CbGFxdDFhdU90RStGOFFVV3JVb3RpQzVxQkorVXVFV2RWQ2Igcm9vdEBuaXhvcwo=
 
 # Not strictly necessary, but this will reduce your disk utilization
 builders-use-substitutes = true
 ```
 
+To allow Nix to connect to a builder not running on port 22, you will also need to create a new file at `/etc/ssh/ssh_config.d/100-linux-builder.conf`:
+
+```
+Host linux-builder
+  Hostname localhost
+  HostKeyAlias linux-builder
+  Port 31022
+```
+
 … and then restart your Nix daemon to apply the change:
 
 ```ShellSession