Compare commits

..

4 commits

8 changed files with 56 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ cluster, depot, lib, ... }:
{ cluster, config, depot, lib, ... }:
let
inherit (cluster.config.services.hercules-ci-multi-agent) nodes secrets;
@ -40,8 +40,19 @@ in
settings = {
clusterJoinTokenPath = secrets."clusterJoinToken-${org}".path;
binaryCachesPath = secrets.cacheConfig.path;
concurrentTasks = lib.pipe config.reflection.hardware.cpu.cores [
(lib.flip builtins.div 2)
builtins.floor
(lib.max 2)
];
};
});
nix.settings.cores = lib.pipe config.reflection.hardware.cpu.cores [
(builtins.mul 0.75)
builtins.floor
(lib.max 1)
];
users.groups.hercules-ci-agent.members = map (org: "hci-${org}") (lib.attrNames nodes);
}

View file

@ -16,6 +16,11 @@ tools: rec {
};
};
hardware = {
cpu.cores = 8;
memory.gb = 64;
};
hyprspace = {
enable = true;
id = "QmYs4xNBby2fTs8RnzfXEk161KD4mftBfCiR8yXtgGPj4J";

View file

@ -17,6 +17,11 @@ tools: rec {
};
};
hardware = {
cpu.cores = 1;
memory.gb = 1;
};
hyprspace = {
enable = true;
id = "12D3KooWL84sAtq1QTYwb7gVbhSNX5ZUfVt4kgYKz8pdif1zpGUh";

View file

@ -16,6 +16,11 @@ tools: rec {
};
};
hardware = {
cpu.cores = 4;
memory.gb = 8;
};
hyprspace = {
enable = true;
id = "12D3KooWN31twBvdEcxz2jTv4tBfPe3mkNueBwDJFCN4xn7ZwFbi";

View file

@ -9,6 +9,7 @@ let
./hour/interfaces.nix
./hour/nixos.nix
./hour/ssh.nix
./hour/hardware.nix
];
};

View file

@ -0,0 +1,18 @@
{ lib, ... }:
with lib;
{
options.hardware = {
cpu = {
cores = mkOption {
type = types.ints.unsigned;
};
};
memory = {
gb = mkOption {
type = types.ints.unsigned;
};
};
};
}

View file

@ -17,6 +17,11 @@ tools: rec {
};
};
hardware = {
cpu.cores = 4;
memory.gb = 24;
};
hyprspace = {
enable = true;
id = "QmbrAHuh4RYcyN9fWePCZMVmQjbaNXtyvrDCWz4VrchbXh";

View file

@ -17,6 +17,11 @@ tools: rec {
};
};
hardware = {
cpu.cores = 1;
memory.gb = 1;
};
hyprspace = {
enable = true;
id = "12D3KooWB9AUPorFoACkWbphyargRBV9osJsYuQDumtQ85j7Aqmg";