Compare commits
1 Commits
b0c4b812c8
...
9e111f5ea9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e111f5ea9
|
14
nix/configuration/flake.lock
generated
14
nix/configuration/flake.lock
generated
@@ -170,11 +170,11 @@
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1785893730,
|
||||
"narHash": "sha256-K3pjEDafWrpfC1dc14icLxx9tWx4c/dfKTeiDYoZU7Q=",
|
||||
"lastModified": 1785248363,
|
||||
"narHash": "sha256-hx9Cn1vIa/h54t+s3ObO6+Z3xHSA1zc3YVRWxTZcigc=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "83f05b36778dd90d4e15e0d020685d9388cbaea1",
|
||||
"revCount": 39,
|
||||
"rev": "0addf91edf82775a0dc5022a81065ef101305e64",
|
||||
"revCount": 38,
|
||||
"type": "git",
|
||||
"url": "https://code.fizz.buzz/talexander/nix_builder.git"
|
||||
},
|
||||
@@ -185,11 +185,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1785967620,
|
||||
"narHash": "sha256-IItrdb7Puk05RqOBWZYFC5X6Wl1sJmCfh5MWVHw5iMM=",
|
||||
"lastModified": 1785318670,
|
||||
"narHash": "sha256-dN6Ou5x/+23FZLEpYP3IffO+NyJFzUlGumt1uu3MMaY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b7c2ada94fe99c15b0dbcf4d11fd7850b957a436",
|
||||
"rev": "0954f7ee2f6bb3dc7d4e3d0d8bcb8fd4bde4cfc5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
config = {
|
||||
me.distributed_build.enable = true;
|
||||
me.distributed_build.machines.quark = {
|
||||
enable_build = false;
|
||||
enable_substituter = false;
|
||||
enable = false;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
};
|
||||
me.distributed_build.machines.hydra = {
|
||||
enable_build = false;
|
||||
enable_substituter = true;
|
||||
enable = true;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
|
||||
@@ -4,19 +4,10 @@
|
||||
config = {
|
||||
me.distributed_build.enable = true;
|
||||
me.distributed_build.machines.quark = {
|
||||
enable_build = false;
|
||||
enable_substituter = false;
|
||||
enable = true;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
};
|
||||
me.distributed_build.machines.hydra = {
|
||||
enable_build = false;
|
||||
enable_substituter = true;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
substituter_url = "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
config = {
|
||||
me.distributed_build.enable = true;
|
||||
me.distributed_build.machines.quark = {
|
||||
enable_build = false;
|
||||
enable_substituter = false;
|
||||
enable = false;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
};
|
||||
me.distributed_build.machines.hydra = {
|
||||
enable_build = false;
|
||||
enable_substituter = true;
|
||||
enable = true;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
config = {
|
||||
me.distributed_build.enable = true;
|
||||
me.distributed_build.machines.quark = {
|
||||
enable_build = false;
|
||||
enable_substituter = false;
|
||||
enable = false;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
};
|
||||
me.distributed_build.machines.hydra = {
|
||||
enable_build = false;
|
||||
enable_substituter = true;
|
||||
enable = true;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
|
||||
@@ -3,16 +3,8 @@
|
||||
|
||||
config = {
|
||||
me.distributed_build.enable = true;
|
||||
me.distributed_build.machines.quark = {
|
||||
enable_build = false;
|
||||
enable_substituter = false;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
};
|
||||
me.distributed_build.machines.hydra = {
|
||||
enable_build = false;
|
||||
enable_substituter = true;
|
||||
enable = true;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
|
||||
@@ -4,19 +4,10 @@
|
||||
config = {
|
||||
me.distributed_build.enable = true;
|
||||
me.distributed_build.machines.quark = {
|
||||
enable_build = false;
|
||||
enable_substituter = false;
|
||||
enable = true;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
};
|
||||
me.distributed_build.machines.hydra = {
|
||||
enable_build = false;
|
||||
enable_substituter = true;
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
substituter_url = "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,14 +10,7 @@
|
||||
|
||||
let
|
||||
make_machine_config = name: {
|
||||
enable_build = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to use the ${name} machine during distributed builds.";
|
||||
};
|
||||
|
||||
enable_substituter = lib.mkOption {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
@@ -66,30 +59,11 @@ let
|
||||
hostName = lib.mkForce "hydra?remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
build_machine_list = (
|
||||
map (
|
||||
hostname:
|
||||
(lib.mkIf config.me.distributed_build.machines."${hostname}".enable_build (
|
||||
lib.mkMerge [
|
||||
{
|
||||
hostName = hostname;
|
||||
sshUser = "nixworker";
|
||||
sshKey = "/persist/manual/ssh/root/keys/id_ed25519";
|
||||
maxJobs = 1;
|
||||
supportedFeatures = all_nixos_configs."${hostname}".config.me.optimizations.system_features;
|
||||
protocol = "ssh-ng";
|
||||
}
|
||||
static_host_configs."${hostname}"
|
||||
config.me.distributed_build.machines."${hostname}".additional_config
|
||||
]
|
||||
))
|
||||
) (builtins.attrNames all_nixos_configs)
|
||||
);
|
||||
substituters_list = (
|
||||
map (
|
||||
hostname:
|
||||
(lib.mkIf (
|
||||
config.me.distributed_build.machines."${hostname}".enable_substituter
|
||||
config.me.distributed_build.machines."${hostname}".enable
|
||||
&& config.me.distributed_build.machines."${hostname}".substituter_url != null
|
||||
) (config.me.distributed_build.machines."${hostname}".substituter_url))
|
||||
) (builtins.attrNames all_nixos_configs)
|
||||
@@ -138,7 +112,25 @@ in
|
||||
];
|
||||
}
|
||||
{
|
||||
nix.buildMachines = build_machine_list;
|
||||
nix.buildMachines = (
|
||||
map (
|
||||
hostname:
|
||||
(lib.mkIf config.me.distributed_build.machines."${hostname}".enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
hostName = hostname;
|
||||
sshUser = "nixworker";
|
||||
sshKey = "/persist/manual/ssh/root/keys/id_ed25519";
|
||||
maxJobs = 1;
|
||||
supportedFeatures = all_nixos_configs."${hostname}".config.me.optimizations.system_features;
|
||||
protocol = "ssh-ng";
|
||||
}
|
||||
static_host_configs."${hostname}"
|
||||
config.me.distributed_build.machines."${hostname}".additional_config
|
||||
]
|
||||
))
|
||||
) (builtins.attrNames all_nixos_configs)
|
||||
);
|
||||
}
|
||||
(lib.mkIf has_any_substituters {
|
||||
nix.settings.substitute = lib.mkForce true;
|
||||
|
||||
Reference in New Issue
Block a user