builders: migrate tmpfs to new build-dir
Martin Weinelt committed
Dec 2, 2025 at 01:34 UTC
52d7f95b78baa3314ec09bd03f8b1aff6a0404b5
2 files changed
+17
-8
builders/common/system.nix
-3
@@ -17,7 +17,4 @@
17
18
# use memory more efficiently at the cost of some compute
19
zramSwap.enable = true;
20
-
21
- # enable huge pages for tmpfs on /tmp
22
- boot.tmp.tmpfsHugeMemoryPages = "within_size";
20
}
builders/profiles/hetzner-ax101r.nix
+17
-5
@@ -13,11 +13,23 @@
13
boot.supportedFilesystems.zfs = true;
14
networking.hostId = "91312b0a";
15
16
- boot.tmp = {
17
- useTmpfs = true;
18
- # 128G tmpfs, 128G RAM for standard builders
19
- # 160G tmpfs, 96G RAM for big parallel builders
20
- tmpfsSize = if lib.elem "big-parallel" config.nix.settings.system-features then "160G" else "128G";
16
+ fileSystems."/nix/var/nix/builds" = {
17
+ device = "none";
18
+ fsType = "tmpfs";
19
+ options = [
20
+ "huge=within_size"
21
+ "mode=0700"
22
+ "nosuid"
23
+ "nodev"
24
+ ]
25
+ # 128G tmpfs, 128G RAM (+zram swap) for standard builders
26
+ # 160GB tmpfs, 96 GB RAM (+zram swap) for big-parallel builders
27
+ ++ (
28
+ if lib.elem "big-parallel" config.nix.settings.system-features then
29
+ [ "size=160G" ]
30
+ else
31
+ [ "size=128G" ]
32
+ );
33
};
34
35
boot.initrd.availableKernelModules = [