remotes
This commit is contained in:
parent
a484bed0e5
commit
9166792bb3
|
@ -31,6 +31,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# run/build weird binaries
|
# run/build weird binaries
|
||||||
|
# TODO: somehow make sure this is in sync with remote-builders
|
||||||
boot.binfmt.emulatedSystems = [
|
boot.binfmt.emulatedSystems = [
|
||||||
"wasm32-wasi"
|
"wasm32-wasi"
|
||||||
"wasm64-wasi"
|
"wasm64-wasi"
|
||||||
|
|
|
@ -87,6 +87,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# run/build weird binaries
|
# run/build weird binaries
|
||||||
|
# TODO: somehow make sure this is in sync with remote-builders
|
||||||
boot.binfmt.emulatedSystems = [
|
boot.binfmt.emulatedSystems = [
|
||||||
"wasm32-wasi"
|
"wasm32-wasi"
|
||||||
"wasm64-wasi"
|
"wasm64-wasi"
|
||||||
|
|
|
@ -6,62 +6,76 @@ let
|
||||||
# - "benchmark" - has "equal" performance
|
# - "benchmark" - has "equal" performance
|
||||||
# - "big-parallel" - is beefy, for stuff like llvm
|
# - "big-parallel" - is beefy, for stuff like llvm
|
||||||
|
|
||||||
|
# find 'publicKey' with `ssh-keyscan`
|
||||||
|
|
||||||
remotes = [
|
remotes = [
|
||||||
/** /
|
/**/
|
||||||
{
|
{
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" "wasm32-wasi" "wasm64-wasi" "x86_64-windows" "aarch64-linux" "riscv64-linux" ];
|
||||||
hostName = "bolle.pbsds.net";
|
hostName = "bolle.pbsds.net";
|
||||||
sshUser = "pbsds";
|
sshUser = "pbsds";
|
||||||
maxJobs = 16;
|
maxJobs = 16;
|
||||||
#maxJobs = 1; # at least for big-parallel
|
#maxJobs = 1; # at least for big-parallel
|
||||||
speedFactor = 2;
|
speedFactor = 2;
|
||||||
supportedFeatures = [ "kvm" "big-parallel" "nixos-test" ];
|
supportedFeatures = [ "kvm" "big-parallel" "nixos-test" ];
|
||||||
#mandatoryFeatures = [ ];
|
#mandatoryFeatures = [ ];
|
||||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBHdkKmRB0WjD3L+k8GNTVJDLpOUqLBMW17ld/Jzapo6";
|
publicKey = "bolle.pbsds.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILeOB/57N1fQPVorIUlkkJZaQduBo+4+km2Qbj4ebd/k";
|
||||||
proxy.user="pederbs";
|
proxy.user = "pederbs";
|
||||||
proxy.host="isvegg.pvv.ntnu.no";
|
proxy.host = "isvegg.pvv.ntnu.no";
|
||||||
proxy.publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU=";
|
proxy.publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU=";
|
||||||
}
|
}
|
||||||
/**/
|
/**/
|
||||||
{
|
{
|
||||||
systems = ["x86_64-linux"];
|
systems = [ "x86_64-linux" "wasm32-wasi" "wasm64-wasi" "x86_64-windows" "aarch64-linux" "riscv64-linux" ];
|
||||||
hostName = "rocm.pbsds.net";
|
hostName = "noximilien.pbsds.net";
|
||||||
sshUser = "pbsds";
|
sshUser = "pbsds";
|
||||||
maxJobs = 8;
|
maxJobs = 4;
|
||||||
#maxJobs = 4;
|
#maxJobs = 1; # at least for big-parallel
|
||||||
#maxJobs = 1; # at least for big-parallel
|
speedFactor = 1;
|
||||||
speedFactor = 3;
|
supportedFeatures = [ "kvm" "big-parallel" "nixos-test" ];
|
||||||
supportedFeatures = [ "kvm" "big-parallel" ];
|
#mandatoryFeatures = [ ];
|
||||||
#mandatoryFeatures = [ ];
|
publicKey = "noximilien.pbsds.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ3QhTGS03Sqm6OeCEz5AIGqJnBttKaBqMgNXp3Md7t4";
|
||||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGDuWdqEQ5mmVjuKi6f/Q2PFxuqB3URpgTHid06Vw7we";
|
|
||||||
proxy.user="pederbs";
|
|
||||||
proxy.host="isvegg.pvv.ntnu.no";
|
|
||||||
proxy.publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU=";
|
|
||||||
}
|
}
|
||||||
/**/
|
/**/
|
||||||
{
|
{
|
||||||
systems = ["x86_64-linux"];
|
systems = ["x86_64-linux"];
|
||||||
hostName = "isvegg.pvv.ntnu.no";
|
hostName = "rocm.pbsds.net";
|
||||||
sshUser = "pederbs";
|
sshUser = "pbsds";
|
||||||
maxJobs = 2;
|
maxJobs = 8;
|
||||||
|
#maxJobs = 4;
|
||||||
|
#maxJobs = 1; # at least for big-parallel
|
||||||
|
speedFactor = 3;
|
||||||
|
supportedFeatures = [ "kvm" "big-parallel" ];
|
||||||
|
#mandatoryFeatures = [ ];
|
||||||
|
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGDuWdqEQ5mmVjuKi6f/Q2PFxuqB3URpgTHid06Vw7we";
|
||||||
|
proxy.user = "pederbs";
|
||||||
|
proxy.host = "isvegg.pvv.ntnu.no";
|
||||||
|
proxy.publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU=";
|
||||||
|
}
|
||||||
|
/**/
|
||||||
|
{
|
||||||
|
systems = ["x86_64-linux"];
|
||||||
|
hostName = "isvegg.pvv.ntnu.no";
|
||||||
|
sshUser = "pederbs";
|
||||||
|
maxJobs = 2;
|
||||||
speedFactor = 0;
|
speedFactor = 0;
|
||||||
publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU=";
|
publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGurF7rdnrDP/VgIK2Tx38of+bX/QGCGL+alrWnZ1Ca5llGneMulUt1RB9xZzNLHiaWIE+HOP0i4spEaeZhilfU=";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
systems = ["x86_64-linux"];
|
systems = ["x86_64-linux"];
|
||||||
hostName = "eirin.pvv.ntnu.no";
|
hostName = "eirin.pvv.ntnu.no";
|
||||||
sshUser = "pederbs";
|
sshUser = "pederbs";
|
||||||
maxJobs = 2;
|
maxJobs = 2;
|
||||||
speedFactor = 0;
|
speedFactor = 0;
|
||||||
publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBILGULKEzYe5kPorM0rWATv10qq6debfCuYUYqw3HWZm4Y5Pi7mVKcf8lKFNPc1DxT/dStfxxtHj/2fbezaxElk=";
|
publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBILGULKEzYe5kPorM0rWATv10qq6debfCuYUYqw3HWZm4Y5Pi7mVKcf8lKFNPc1DxT/dStfxxtHj/2fbezaxElk=";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
systems = ["x86_64-linux"];
|
systems = ["x86_64-linux"];
|
||||||
hostName = "demiurgen.pvv.ntnu.no";
|
hostName = "demiurgen.pvv.ntnu.no";
|
||||||
sshUser = "pederbs";
|
sshUser = "pederbs";
|
||||||
maxJobs = 2;
|
maxJobs = 2;
|
||||||
speedFactor = 0;
|
speedFactor = 0;
|
||||||
publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKw92q3eB5HZbKJN3p+80MtirqcXPu01USE9LnoGYJuDvko1udjIy4UR0wAwELqgs+r7mJyuQPeXmOZKwjHP6tM=";
|
publicKey = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKw92q3eB5HZbKJN3p+80MtirqcXPu01USE9LnoGYJuDvko1udjIy4UR0wAwELqgs+r7mJyuQPeXmOZKwjHP6tM=";
|
||||||
}
|
}
|
||||||
/**/
|
/**/
|
||||||
];
|
];
|
||||||
|
@ -73,8 +87,10 @@ let
|
||||||
}@args:
|
}@args:
|
||||||
let
|
let
|
||||||
buildMachine = lib.filterAttrs (key: _: !builtins.elem key ["publicKey" "proxy"]) args; # this should have syntactic sugar: ...@buildMachine
|
buildMachine = lib.filterAttrs (key: _: !builtins.elem key ["publicKey" "proxy"]) args; # this should have syntactic sugar: ...@buildMachine
|
||||||
in {
|
filter = lib.mkIf (buildMachine.hostName != config.networking.fqdn);
|
||||||
|
in filter {
|
||||||
nix.buildMachines = [ buildMachine ];
|
nix.buildMachines = [ buildMachine ];
|
||||||
|
#TODO: users.users.root.openssh.authorizedKeys.keys
|
||||||
programs.ssh.knownHosts.${buildMachine.hostName}.publicKey = publicKey;
|
programs.ssh.knownHosts.${buildMachine.hostName}.publicKey = publicKey;
|
||||||
# the timeout is great to have when a remote is unresponsive, as nix currently does not give a shit
|
# the timeout is great to have when a remote is unresponsive, as nix currently does not give a shit
|
||||||
programs.ssh.extraConfig = ''
|
programs.ssh.extraConfig = ''
|
||||||
|
@ -95,10 +111,7 @@ in {
|
||||||
# https://github.com/NixOS/nix/issues/2457
|
# https://github.com/NixOS/nix/issues/2457
|
||||||
|
|
||||||
# useful when the builder has a faster internet connection than i do
|
# useful when the builder has a faster internet connection than i do
|
||||||
nix.extraOptions = ''
|
nix.settings.builders-use-substitutes = true;
|
||||||
builders-use-substitutes = true
|
|
||||||
'';
|
|
||||||
# TODO: can i make ^ non-string?
|
|
||||||
|
|
||||||
# TIL: this can be a list of configurations and lambdas, not just file paths
|
# TIL: this can be a list of configurations and lambdas, not just file paths
|
||||||
imports = builtins.map mkRemoteConfig remotes;
|
imports = builtins.map mkRemoteConfig remotes;
|
||||||
|
|
Loading…
Reference in New Issue