1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{ nixpkgs, declInput }: let pkgs = import nixpkgs {}; in {
# this file generates the spec.json file which contains all the jobsets (list of jobs)
# a job set may be all the hosts of a user of stockholm
# what we need to get here is for each host we want to build the "input"
# from its source.nix and add them to the "inputs" field
# in addition to that we need to define how a system is built inside the
# "local" release.nix
# nixexprinput points to the path expression which should be used for evaluation
# nixexprpath is the file which will be built.
# that means in best case we should be able to use default.nix from
# <stockholm> after nixos-config is set!
jobsets = pkgs.runCommand "spec.json" {} ''
cat <<EOF
${builtins.toXML declInput}
EOF
cat > $out <<EOF
{
"makefu x.r": {
"enabled": 1,
"hidden": false,
"description": "host build (not working right now), also paths in nixos-config and secrets are absolute but should point to <stockholm>",
"nixexprinput": "src",
"nixexprpath": "host.nix",
"checkinterval": 15,
"schedulingshares": 100,
"enableemail": false,
"emailoverride": "",
"keepnr": 3,
"inputs": {
"src": { "type": "git", "value": "http://cgit.euer.krebsco.de/hydra-stockholm", "emailresponsible": false },
"stockholm": { "type": "git", "value": "http://cgit.krebsco.de/stockholm latest", "emailresponsible": false },
"nixpkgs": { "type": "git", "value": "https://github.com/makefu/nixpkgs 51810e0", "emailresponsible": false },
"nixos-hardware": { "type": "git", "value": "https://github.com/nixos/nixos-hardware.git 8a05dc9", "emailresponsible": false },
"python": { "type": "git", "value": "https://github.com/garbas/nixpkgs-python cac319b7", "emailresponsible": false },
"nixos-config": { "type": "path", "value": "/var/src/stockholm/makefu/1systems/x/config.nix", "emailresponsible": false },
"secrets": { "type": "path", "value": "/var/src/stockholm/makefu/6tests/data/secrets", "emailresponsible": false },
"host": { "type": "string", "value": "x", "emailresponsible": false },
"owner": { "type": "string", "value": "makefu", "emailresponsible": false }
}
},
"makefu-pkgs": {
"enabled": 1,
"hidden": false,
"description": "makefu overlay build",
"nixexprinput": "src",
"nixexprpath": "pkgs.nix",
"checkinterval": 15,
"schedulingshares": 100,
"enableemail": false,
"emailoverride": "",
"keepnr": 3,
"inputs": {
"src": { "type": "git", "value": "http://cgit.euer.krebsco.de/hydra-stockholm", "emailresponsible": false },
"stockholm": { "type": "git", "value": "http://cgit.krebsco.de/stockholm latest", "emailresponsible": false },
"owner": { "type": "string", "value": "makefu", "emailresponsible": false },
"nixpkgs": { "type": "git", "value": "https://github.com/makefu/nixpkgs 51810e0", "emailresponsible": false }
}
}
}
EOF
'';
}
|