mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 15:13:46 +00:00
f6fd10cbd8
Just set nix.distributedBuilds to true and nix.buildMachines to a list of machines that can perform Nix builds via SSH, and local builds will be forwarded appropriately. So now any user can say something like nix-build /etc/nixos/nixpkgs/ --arg system '"powerpc-linux"' -A libxml2 and the build for powerpc-linux will be forwarded to a machine of that type. svn path=/nixos/trunk/; revision=9696
18 lines
364 B
Nix
18 lines
364 B
Nix
{config, pkgs, nix, nixEnvVars}:
|
|
|
|
{
|
|
name = "nix-daemon";
|
|
|
|
job = "
|
|
start on startup
|
|
stop on shutdown
|
|
respawn
|
|
script
|
|
export PATH=${if config.nix.distributedBuilds then "${pkgs.openssh}/bin:" else ""}${pkgs.openssl}/bin:${nix}/bin:$PATH
|
|
${nixEnvVars}
|
|
exec ${nix}/bin/nix-worker --daemon > /dev/null 2>&1
|
|
end script
|
|
";
|
|
|
|
}
|