Skip to content

Commit

Permalink
nix/hydra-build-client: auto generate systems
Browse files Browse the repository at this point in the history
  • Loading branch information
linyinfeng committed Dec 17, 2024
1 parent 790f8ce commit a83b7b0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions nixos/profiles/nix/hydra-builder-client/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{ config, ... }:
{ config, lib, ... }:
let
dir = "nix-build-machines/hydra-builder";
keyFile = config.sops.secrets."hydra_builder_private_key".path;
allSystems = lib.concatStringsSep "," config.lib.self.systems;
nonAarch64Systems = lib.concatStringsSep "," (lib.remove "aarch64-linux" config.lib.self.systems);
in
{
nix = {
Expand All @@ -12,18 +14,18 @@ in
};
# https://nixos.org/manual/nix/stable/advanced-topics/distributed-builds
environment.etc."${dir}/machines".text = ''
hydra-builder@nuc x86_64-linux,i686-linux,aarch64-linux ${keyFile} 8 100 kvm,nixos-test,benchmark,big-parallel
hydra-builder@fsn0 aarch64-linux ${keyFile} 2 200 benchmark,big-parallel
hydra-builder@nuc ${allSystems} ${keyFile} 8 100 kvm,nixos-test,benchmark,big-parallel
hydra-builder@fsn0 aarch64-linux ${keyFile} 2 200 benchmark,big-parallel
'';
environment.etc."${dir}/machines-workstation".text = ''
hydra-builder@nuc x86_64-linux,i686-linux ${keyFile} 8 100 kvm,nixos-test,benchmark,big-parallel
hydra-builder@xps8930 x86_64-linux,i686-linux ${keyFile} 8 100 kvm,nixos-test,benchmark,big-parallel
hydra-builder@owl x86_64-linux,i686-linux ${keyFile} 8 100 kvm,nixos-test,benchmark,big-parallel
hydra-builder@nuc ${nonAarch64Systems} ${keyFile} 8 100 kvm,nixos-test,benchmark,big-parallel
hydra-builder@xps8930 ${nonAarch64Systems} ${keyFile} 8 100 kvm,nixos-test,benchmark,big-parallel
hydra-builder@owl ${nonAarch64Systems} ${keyFile} 8 100 kvm,nixos-test,benchmark,big-parallel
hydra-builder@fsn0 aarch64-linux ${keyFile} 2 100 benchmark,big-parallel
hydra-builder@nuc aarch64-linux ${keyFile} 8 50
hydra-builder@xps8930 aarch64-linux ${keyFile} 8 50
hydra-builder@owl aarch64-linux ${keyFile} 8 50
hydra-builder@fsn0 aarch64-linux ${keyFile} 2 100 benchmark,big-parallel
hydra-builder@nuc aarch64-linux ${keyFile} 8 50
hydra-builder@xps8930 aarch64-linux ${keyFile} 8 50
hydra-builder@owl aarch64-linux ${keyFile} 8 50
'';
sops.secrets."hydra_builder_private_key" = {
terraformOutput.enable = true;
Expand Down

0 comments on commit a83b7b0

Please sign in to comment.