feat(nixbuild): centralize distributed build config
- Moved shared distributed build settings to `nixbuild.nix` for reuse. - Updated `m4` and `rialo` systems to import the centralized configuration. - Simplifies maintenance and ensures consistency across systems.
This commit is contained in:
parent
143e8cbf98
commit
3f6c1df78c
3 changed files with 64 additions and 77 deletions
|
|
@ -4,45 +4,10 @@ with lib.metacfg;
|
|||
{
|
||||
system.defaults.dock.autohide = false;
|
||||
|
||||
nix.distributedBuilds = true;
|
||||
|
||||
nix.buildMachines = [
|
||||
{
|
||||
hostName = "m1.local";
|
||||
system = "aarch64-darwin";
|
||||
maxJobs = 4;
|
||||
speedFactor = 2;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
{
|
||||
hostName = "rialo.local";
|
||||
system = "aarch64-darwin";
|
||||
maxJobs = 4;
|
||||
speedFactor = 2;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
{
|
||||
hostName = "sgx.local";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 4;
|
||||
speedFactor = 1;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
imports = [
|
||||
./../../nixbuild.nix
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"ssh-ng://harald@m4.local?ssh-key=/etc/ssh/nix-builder-key"
|
||||
"ssh-ng://harald@rialo.local?ssh-key=/etc/ssh/nix-builder-key"
|
||||
];
|
||||
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
brews = [
|
||||
|
|
|
|||
|
|
@ -2,48 +2,10 @@
|
|||
|
||||
with lib.metacfg;
|
||||
{
|
||||
|
||||
|
||||
nix.distributedBuilds = true;
|
||||
|
||||
nix.buildMachines = [
|
||||
{
|
||||
hostName = "m1.local";
|
||||
system = "aarch64-darwin";
|
||||
maxJobs = 4;
|
||||
speedFactor = 2;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
{
|
||||
hostName = "rialo.local";
|
||||
system = "aarch64-darwin";
|
||||
maxJobs = 4;
|
||||
speedFactor = 2;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
{
|
||||
hostName = "sgx.local";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 4;
|
||||
speedFactor = 1;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
imports = [
|
||||
./../../nixbuild.nix
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"ssh-ng://harald@m4.local?ssh-key=/etc/ssh/nix-builder-key"
|
||||
"ssh-ng://harald@rialo.local?ssh-key=/etc/ssh/nix-builder-key"
|
||||
];
|
||||
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
brews = [
|
||||
|
|
|
|||
60
systems/nixbuild.nix
Normal file
60
systems/nixbuild.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
with lib.metacfg;
|
||||
{
|
||||
nix.distributedBuilds = true;
|
||||
|
||||
nix.buildMachines = [
|
||||
{
|
||||
hostName = "m4";
|
||||
system = "aarch64-darwin";
|
||||
maxJobs = 4;
|
||||
speedFactor = 3;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
{
|
||||
hostName = "rialo";
|
||||
system = "aarch64-darwin";
|
||||
maxJobs = 4;
|
||||
speedFactor = 3;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
{
|
||||
hostName = "sgx";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 4;
|
||||
speedFactor = 1;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
{
|
||||
hostName = "sgx";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 4;
|
||||
speedFactor = 1;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
{
|
||||
hostName = "sgx";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 4;
|
||||
speedFactor = 1;
|
||||
sshUser = "harald";
|
||||
sshKey = "/etc/ssh/nix-builder-key";
|
||||
}
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"ssh-ng://harald@m4?ssh-key=/etc/ssh/nix-builder-key"
|
||||
"ssh-ng://harald@rialo?ssh-key=/etc/ssh/nix-builder-key"
|
||||
"ssh-ng://harald@sgx?ssh-key=/etc/ssh/nix-builder-key"
|
||||
];
|
||||
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue