NixServe : Replace with RemoteBuilder.

This commit is contained in:
Dmitry Voronin 2024-03-09 18:38:41 +03:00
parent b9580f7d48
commit 1d1b3d2708
4 changed files with 25 additions and 4 deletions

View file

@ -178,6 +178,7 @@
./module/Ollama.nix
./module/PowersaveAmd.nix
./module/Print.nix
./module/RemoteBuild.nix
./module/VirtManager.nix
./user/Voronind.nix
];
@ -200,9 +201,9 @@
./module/Docker.nix
./module/Ftpd.nix
./module/Gnome.nix
./module/NixServe.nix
./module/Ollama.nix
./module/PowersaveAmd.nix
./module/RemoteBuilder.nix
./user/Voronind.nix
];
};

15
module/RemoteBuild.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, pkgs, ... }: {
nix.buildMachines = [{
hostName = "home";
protocol = "ssh-ng";
system = "x86_64-linux";
maxJobs = 1;
speedFactor = 2;
mandatoryFeatures = [ ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
}];
nix.distributedBuilds = true;
nix.extraOptions = ''
builders-use-substitutes = true
'';
}

5
module/RemoteBuilder.nix Normal file
View file

@ -0,0 +1,5 @@
{ ... }: {
nix.extraOptions = ''
extra-secret-key-files = /root/.nixcache/secret-key-file
'';
}

View file

@ -7,9 +7,9 @@
keep-derivations = true
keep-outputs = true
min-free = ${toString (50 * 1024 * 1024 * 1024)}
extra-substituters = https://nixcache.voronind.com
extra-trusted-substituters = https://nixcache.voronind.com
extra-trusted-public-keys = nixcache.voronind.com:i9dE2VZI40/LCM/mmUGs8kwal1bQo3xbSjrzxhInmOw=
extra-substituters = ssh-ng://home
extra-trusted-substituters = ssh-ng://home
extra-trusted-public-keys = home:i9dE2VZI40/LCM/mmUGs8kwal1bQo3xbSjrzxhInmOw=
'';
# max-free = ${toString (10 * 1024 * 1024 * 1024)}
# nix.gc = {