blob: 7dda48763d72c2d5b1d884aacceaafad51ca1fc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# This module adds ahmed as a remote builder for ali.
# Note that ahmed is configured such that root@ali is allowed to connect to remotebuilder@ahmed.
# TODO: Dedublicate with hosts/muhammed/remote-builders/ahmed-builder.nix
{metadata, ...}: {
nix.buildMachines = [
{
protocol = "ssh-ng";
hostName = "ahmed-builder";
system = "x86_64-linux";
maxJobs = 1;
speedFactor = 1;
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
mandatoryFeatures = [];
}
];
environment.etc."ssh/ssh_config.d/100-ahmed-builder.conf".text = ''
Host ahmed-builder
User remotebuilder
Hostname ${metadata.hosts.ahmed.ipv4Address}
HostKeyAlias ahmed-builder
'';
# We have to trust ahmeds host key or the Nix daemon will fail to connect.
programs.ssh.knownHosts = {
ahmed-builder = {
hostNames = ["ahmed-builder"];
publicKey = metadata.hosts.ahmed.sshKeys.root;
};
};
}
|