mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-24 17:58:30 +02:00
feat: adjust remote builder's max-jobs
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
# Related Docs:
|
# Related Docs:
|
||||||
# 1. https://github.com/NixOS/nix/issues/7380
|
# 1. https://github.com/NixOS/nix/issues/7380
|
||||||
# 2. https://nixos.wiki/wiki/Distributed_build
|
# 2. https://nixos.wiki/wiki/Distributed_build
|
||||||
|
# 3. https://github.com/NixOS/nix/issues/2589
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
# set local's max-job to 0 to force remote building(disable local building)
|
# set local's max-job to 0 to force remote building(disable local building)
|
||||||
@@ -34,6 +35,8 @@
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
|
# Nix seems always try to build on the machine remotely
|
||||||
|
# to make use of the local machine's high-performance CPU, do not set remote builder's maxJobs too high.
|
||||||
{
|
{
|
||||||
# some of my remote builders are running NixOS
|
# some of my remote builders are running NixOS
|
||||||
# and has the same sshUser, sshKey, systems, etc.
|
# and has the same sshUser, sshKey, systems, etc.
|
||||||
@@ -45,9 +48,9 @@
|
|||||||
# 3. a host alias defined globally in /etc/ssh/ssh_config
|
# 3. a host alias defined globally in /etc/ssh/ssh_config
|
||||||
hostName = "aquamarine";
|
hostName = "aquamarine";
|
||||||
# remote builder's max-job
|
# remote builder's max-job
|
||||||
maxJobs = 4;
|
maxJobs = 2;
|
||||||
# speedFactor's a signed integer
|
# speedFactor's a signed integer
|
||||||
# nix seems always try to build on the machine with the highest speedFactor
|
# but it seems that it's not used by Nix, takes no effect
|
||||||
speedFactor = 1;
|
speedFactor = 1;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -59,7 +62,7 @@
|
|||||||
{
|
{
|
||||||
inherit sshUser sshKey systems supportedFeatures;
|
inherit sshUser sshKey systems supportedFeatures;
|
||||||
hostName = "kana";
|
hostName = "kana";
|
||||||
maxJobs = 2;
|
maxJobs = 1;
|
||||||
speedFactor = 1;
|
speedFactor = 1;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user