Hydra: Difference between revisions

imported>Crawford
Add workaround for git-fetch timeout
imported>Clerie
Line 43: Line 43:


This option leads to the file /etc/nix/machines being created. If the hydra service config is still set to buildMachinesFiles = [], then it will be ignored, so remove this option again or add /etc/nix/machines to it.
This option leads to the file /etc/nix/machines being created. If the hydra service config is still set to buildMachinesFiles = [], then it will be ignored, so remove this option again or add /etc/nix/machines to it.
== Flake jobset ==
Configure jobset the following:
* Type: Flake
* Flake URI: an URI to a repo containing a Flake like git+https://git.myserver.net/user/repo.git
The Flake output should have the attribute <code>hydraJobs</code> containing an attribute set that may be nested and reference derivations.
A sample Flake output that makes Hydra build all packages could look like this:
<syntaxHighlight lang=nix>
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };
  outputs = { self, nixpkgs, ... }: {
    packages.x86_64-linux = {
      ...
    };
    hydraJobs = {
      inherit (self)
        packages;
    };
  };
}
</syntaxHighlight>


== Build a single Package from nixpkgs ==
== Build a single Package from nixpkgs ==