fix: increase of tmpfs's size by mount a btrfs subvolume for it

feat: migrate nixos-installer from a separate branch into a folder
This commit is contained in:
Ryan Yin
2023-12-21 23:52:55 +08:00
parent 45b52845f7
commit b12af73ff6
9 changed files with 390 additions and 1 deletions
@@ -26,6 +26,8 @@
boot.kernelModules = ["kvm-intel"];
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
boot.extraModulePackages = [];
# clear /tmp on boot to get a stateless /tmp directory.
boot.tmp.cleanOnBoot = true;
# Enable binfmt emulation of aarch64-linux, this is required for cross compilation.
boot.binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"];
@@ -82,6 +84,12 @@
options = ["subvol=@snapshots" "compress-force=zstd:1"];
};
fileSystems."/tmp" = {
device = "/dev/disk/by-uuid/1167076c-dee1-486c-83c1-4b1af37555cd";
fsType = "btrfs";
options = ["subvol=@tmp" "compress-force=zstd:1"];
};
# mount swap subvolume in readonly mode.
fileSystems."/swap" = {
device = "/dev/disk/by-uuid/1167076c-dee1-486c-83c1-4b1af37555cd";