@cryptotaxi247 / infra / commits / 4fcb5ebf

Enable diffoscope

Eelco Dolstra committed Dec 8, 2016 at 17:59 UTC 4fcb5ebf3b8fd5aa7e62ff8ffb6ca85e1c5d5ec0
2 files changed +23 -1
delft/common.nix
+21 -1
@@ -2,6 +2,20 @@
2
3 with pkgs.lib;
4
5 +let
6 +
7 + diffoscopeWrapper = pkgs.writeScript "diffoscope-wrapper"
8 + ''
9 + #! ${pkgs.stdenv.shell}
10 + echo ""
11 + echo "non-determinism detected in $2; diff with previous round follows:"
12 + echo ""
13 + ${pkgs.utillinux}/bin/runuser -u diffoscope -- ${pkgs.diffoscope}/bin/diffoscope "$1" "$2"
14 + exit 0
15 + '';
16 +
17 +in
18 +
19 {
20 imports = [ ./static-net-config.nix ];
21
@@ -43,7 +57,7 @@ with pkgs.lib;
57 boot.kernel.sysctl."kernel.panic" = 60;
58 boot.kernel.sysctl."kernel.panic_on_oops" = 1;
59
46 - #nix.package = pkgs.nixUnstable;
60 + nix.package = pkgs.nixUnstable;
61
62 nix.useSandbox = true;
63
@@ -54,6 +68,7 @@ with pkgs.lib;
68 nix.extraOptions =
69 ''
70 allowed-impure-host-deps = /etc/protocols /etc/services /etc/nsswitch.conf
71 + diff-hook = ${diffoscopeWrapper}
72 '';
73
74 services.zabbixAgent.enable = true;
@@ -120,4 +135,9 @@ with pkgs.lib;
135
136 # Disable sending email from cron.
137 services.cron.mailto = "";
138 +
139 + # Don't run diffoscope as root.
140 + users.extraUsers.diffoscope =
141 + { description = "Diffoscope containment user";
142 + };
143 }
delft/hydra.nix
+2
@@ -47,6 +47,8 @@ in
47 <Plugin::Session>
48 cache_size = 32m
49 </Plugin::Session>
50 +
51 + xxx-jobset-repeats = patchelf:master:3 nixos:reproducibility:1
52 '';
53
54 users.extraUsers.hydra.home = mkForce "/home/hydra";