fixed builder

This commit is contained in:
emily 2024-04-05 16:25:59 +02:00
parent 08cb22582f
commit c76ea518f2
Signed by: emily
GPG key ID: F6F4C66207FCF995
5 changed files with 27 additions and 9 deletions

View file

@ -1 +1 @@
ssh://nixremote@seras.kyouma.net x86_64-linux,aarch64-linux - 40 5 nixos-test,benchmark,big-parallel,kvm ssh://build@seras.kyouma.net x86_64-linux,aarch64-linux - 40 5 nixos-test,benchmark,big-parallel,kvm

View file

@ -14,7 +14,14 @@
hostName = "seras"; hostName = "seras";
nftables.enable = lib.mkForce false; nftables.enable = lib.mkForce false;
}; };
nix.settings.trusted-users = [ "nixremote" ]; nix.gc.options = lib.mkForce "--delete-older-than 60d";
nix.settings.trusted-users = [ "build" ];
nix.extraOptions = ''
min-free = ${builtins.toString (4096 * 1024 * 1024)}
max-free = ${builtins.toString (8192 * 1024 * 1024)}
max-substitution-jobs = 20
max-silent-time = 900
'';
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
systemd.network.networks."98-eth-default" = { systemd.network.networks."98-eth-default" = {
@ -22,7 +29,7 @@
"2a0f:be01:0:100::169/128" "2a0f:be01:0:100::169/128"
]; ];
}; };
users.users.nixremote = { users.users.build = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.fish; shell = pkgs.fish;
ignoreShellProgramCheck = true; ignoreShellProgramCheck = true;

View file

@ -1,6 +1,12 @@
{ config, lib, ... }: with lib; { { config, lib, pkgs, ... }: {
kyouma.machine-type.headless = true; kyouma.machine-type.headless = true;
documentation.man.generateCaches = false; documentation.man.generateCaches = false;
services.openssh.enable = mkDefault true; environment.systemPackages = with pkgs; [
services.vnstat.enable = mkDefault true; vim
];
services.openssh.enable = lib.mkDefault true;
services.vnstat.enable = lib.mkDefault true;
} }

View file

@ -1,11 +1,16 @@
{config, lib, pkgs, ... }: { {config, lib, pkgs, ... }: {
nix.buildMachines = [{ nix.buildMachines = [{
hostName = "seras.kyouma.net"; hostName = "seras.kyouma.net";
sshUser = "nixremote"; sshUser = "build";
maxJobs = 40; maxJobs = 40;
speedFactor = 5; speedFactor = 5;
systems = [ "aarch64-linux" "x86_64-linux" ]; systems = [ "aarch64-linux" "x86_64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
}]; }];
nix.distributedBuilds = true; nix.distributedBuilds = true;
programs.ssh = {
knownHosts = {
"seras.kyouma.net".publicKey = "sh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPNVavo3YHVsrYwXRVISu7kDoknn+5inFGySn4azlB8P";
};
};
} }

View file

@ -43,9 +43,9 @@
}; };
}; };
nixConfig = rec { nixConfig = {
builders-use-substitutes = true; builders-use-substitutes = true;
builders = "ssh://nixremote@seras.kyouma.net x86_64-linux,aarch64-linux - 40 5 nixos-test,benchmark,big-parallel,kvm"; builders = "ssh://build@seras.kyouma.net x86_64-linux,aarch64-linux - 40 5 nixos-test,benchmark,big-parallel,kvm";
}; };
outputs = { self, nixpkgs, flake-utils, ... }@inputs: { outputs = { self, nixpkgs, flake-utils, ... }@inputs: {