mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
hetzner_benchmark: set up as nix builder
This commit is contained in:
parent
dd15a482a5
commit
41d9620820
2 changed files with 32 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ in
|
|||
./hetzner_benchmark/nixos/hardware-configuration.nix
|
||||
./hetzner_benchmark/nixos/misc.nix
|
||||
./hetzner_benchmark/nixos/programs.nix
|
||||
./hetzner_benchmark/nixos/builder.nix
|
||||
|
||||
../nixosModules/common/fish.nix
|
||||
../nixosModules/common/disable-command-not-found.nix
|
||||
|
|
|
|||
31
nix/configurations/hetzner_benchmark/nixos/builder.nix
Normal file
31
nix/configurations/hetzner_benchmark/nixos/builder.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# https://nix.dev/tutorials/nixos/distributed-builds-setup.html
|
||||
{ config, ... }:
|
||||
{
|
||||
users.users.remotebuild = {
|
||||
isSystemUser = true;
|
||||
group = "remotebuild";
|
||||
useDefaultShell = true;
|
||||
|
||||
openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys;
|
||||
};
|
||||
|
||||
users.groups.remotebuild = { };
|
||||
nix = {
|
||||
nrBuildUsers = 64; # defaults to 32
|
||||
settings = {
|
||||
trusted-users = [ "remotebuild" ];
|
||||
|
||||
min-free = 50 * 1024 * 1024 * 1024; # start gc when < 10 GB is available
|
||||
max-free = 100 * 1024 * 1024 * 1024; # stop gc when 20 GB is available
|
||||
|
||||
max-jobs = "auto";
|
||||
cores = 0;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.nix-daemon.serviceConfig = {
|
||||
MemoryAccounting = true;
|
||||
MemoryMax = "90%";
|
||||
OOMScoreAdjust = 500;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue