ceres: Use as builder
Eelco Dolstra committed
May 2, 2022 at 14:41 UTC
2a65c35c03163f0ecbe0f86f4bd56aaf5c4f4dd0
2 files changed
+22
-3
delft/build-machine-common.nix
new
+18
@@ -0,0 +1,18 @@
1
+{ config, lib, pkgs, ... }:
2
+
3
+with lib;
4
+
5
+{
6
+ nix.gc.automatic = true;
7
+ nix.gc.dates = "*:45";
8
+ nix.gc.options = ''--max-freed "$((128 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
9
+
10
+ # Randomize GC start times do we don't block all build machines at
11
+ # the same time.
12
+ systemd.timers.nix-gc.timerConfig.RandomizedDelaySec = mkForce "1800";
13
+
14
+ users.extraUsers.root.openssh.authorizedKeys.keys = singleton
15
+ ''
16
+ command="nix-store --serve --write" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOdxl6gDS7h3oeBBja2RSBxeS51Kp44av8OAJPPJwuU/ hydra-queue-runner@rhea
17
+ '';
18
+}
delft/ceres.nix
+4
-3
@@ -4,6 +4,7 @@
4
imports =
5
[ ./common.nix
6
./fstrim.nix
7
+ ./build-machine-common.nix
8
];
9
10
deployment.targetEnv = "hetzner";
@@ -45,9 +46,9 @@
46
47
# zramSwap.enable = true;
48
48
- nix.gc.automatic = true;
49
- nix.gc.options = ''--max-freed "$((400 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
50
- nix.gc.dates = "03,09,15,21:15";
49
+ #nix.gc.automatic = true;
50
+ #nix.gc.options = ''--max-freed "$((400 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
51
+ #nix.gc.dates = "03,09,15,21:15";
52
53
nix.extraOptions = "gc-keep-outputs = false";
54