add hydra jobsets spec

This commit is contained in:
Tim Schubert 2022-10-16 16:39:18 +02:00
parent b164977b2e
commit d6d7a20b3f
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
5 changed files with 67 additions and 1 deletions

27
jobsets.nix Normal file
View file

@ -0,0 +1,27 @@
{ pkgs
, declInput
, projectName
, ...
}:
pkgs.runCommand "spec.json" { } ''
cat <<EOF
${builtins.toXML declInput}
EOF
cat > $out <<EOF
{
"main": {
"enabled": 1,
"hidden": false,
"description": "${projectName}",
"flakeuri": "github:dadada/nix-config/main",
"checkinterval": 300,
"schedulingshares": 1,
"enableemail": false,
"emailoverride": "",
"keepnr": 3,
"type": "flake",
"inputs": ${builtins.toJSON declInput}
}
}
EOF
''