Skip to content

Commit 52d7f95

Browse files
committed
builders: migrate tmpfs to new build-dir
1 parent 3f8810b commit 52d7f95

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

builders/common/system.nix

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,4 @@
1717

1818
# use memory more efficiently at the cost of some compute
1919
zramSwap.enable = true;
20-
21-
# enable huge pages for tmpfs on /tmp
22-
boot.tmp.tmpfsHugeMemoryPages = "within_size";
2320
}

builders/profiles/hetzner-ax101r.nix

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,23 @@
1313
boot.supportedFilesystems.zfs = true;
1414
networking.hostId = "91312b0a";
1515

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+
);
2133
};
2234

2335
boot.initrd.availableKernelModules = [

0 commit comments

Comments
 (0)