2023-01-21 16:06:26 +00:00
|
|
|
{
|
|
|
|
prsJSON,
|
|
|
|
nixpkgs,
|
|
|
|
}: let
|
|
|
|
pkgs = import nixpkgs {};
|
|
|
|
prs = builtins.fromJSON (builtins.readFile prsJSON);
|
|
|
|
jobsets =
|
2023-04-09 12:04:52 +00:00
|
|
|
(builtins.listToAttrs (
|
|
|
|
map (
|
|
|
|
info: {
|
|
|
|
name = "pr${toString info.number}";
|
2023-04-05 07:56:35 +00:00
|
|
|
value = {
|
2023-04-09 12:04:52 +00:00
|
|
|
enabled = info.state == "open";
|
|
|
|
hidden = info.state != "open";
|
|
|
|
description = "PR ${toString info.number}: ${info.title}";
|
2023-04-05 07:56:35 +00:00
|
|
|
nixexprinput = "nixos-config";
|
|
|
|
nixexprpath = "hydra/default.nix";
|
2023-04-09 12:04:52 +00:00
|
|
|
checkinterval = 3600;
|
2023-04-05 07:56:35 +00:00
|
|
|
schedulingshares = 100;
|
|
|
|
enableemail = false;
|
|
|
|
emailoverride = "";
|
|
|
|
keepnr = 1;
|
|
|
|
inputs = {
|
|
|
|
nixos-config = {
|
|
|
|
type = "git";
|
2023-04-09 12:04:52 +00:00
|
|
|
value = "${info.head.repo.clone_url} ${info.head.ref}";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
nixpkgs = {
|
|
|
|
type = "git";
|
2023-04-09 12:07:08 +00:00
|
|
|
value = "https://github.com/NixOS/nixpkgs.git master";
|
2023-04-09 12:04:52 +00:00
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_status_repo = {
|
|
|
|
type = "string";
|
|
|
|
value = "nixos-config";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_repo_owner = {
|
|
|
|
type = "string";
|
|
|
|
value = "${info.head.repo.owner.login}";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_repo_name = {
|
|
|
|
type = "string";
|
|
|
|
value = "${info.head.repo.name}";
|
2023-04-05 07:56:35 +00:00
|
|
|
emailresponsible = false;
|
|
|
|
};
|
2023-01-23 13:51:09 +00:00
|
|
|
};
|
2023-01-21 16:06:26 +00:00
|
|
|
};
|
2023-01-23 13:51:09 +00:00
|
|
|
}
|
|
|
|
)
|
2023-04-09 12:04:52 +00:00
|
|
|
prs
|
|
|
|
))
|
2023-01-21 16:06:26 +00:00
|
|
|
// {
|
|
|
|
nixos-config = {
|
|
|
|
enabled = 1;
|
|
|
|
hidden = false;
|
|
|
|
description = "Current nixos config";
|
|
|
|
nixexprinput = "nixos-config";
|
|
|
|
nixexprpath = "hydra/default.nix";
|
2023-04-09 12:04:52 +00:00
|
|
|
checkinterval = 0;
|
2023-01-21 16:06:26 +00:00
|
|
|
schedulingshares = 100;
|
|
|
|
enableemail = false;
|
|
|
|
emailoverride = "";
|
|
|
|
keepnr = 1;
|
|
|
|
inputs = {
|
|
|
|
nixos-config = {
|
|
|
|
type = "git";
|
2023-04-09 12:04:52 +00:00
|
|
|
value = "https://git.chir.rs/darkkirb/nixos-config main";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
nixpkgs = {
|
|
|
|
type = "git";
|
2023-04-09 12:07:08 +00:00
|
|
|
value = "https://github.com/NixOS/nixpkgs.git master";
|
2023-04-09 12:04:52 +00:00
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_status_repo = {
|
|
|
|
type = "string";
|
|
|
|
value = "nixos-config";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_repo_owner = {
|
|
|
|
type = "string";
|
|
|
|
value = "darkkirb";
|
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
gitea_repo_name = {
|
|
|
|
type = "string";
|
|
|
|
value = "nix-packages";
|
2023-01-21 16:06:26 +00:00
|
|
|
emailresponsible = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets);}
|