ark/hosts/tkaronto/modules/fs.nix

32 lines
719 B
Nix
Raw Normal View History

2022-08-23 08:18:37 +03:00
{config, ...}: let
2022-08-14 10:45:17 +03:00
byLabel = label: "/dev/disk/by-label/${label}";
2024-03-23 20:59:25 +03:00
f2fsOptions = ["compress_algorithm=zstd:6" "compress_chksum" "atgc" "gc_merge" "lazytime"];
2022-08-23 08:18:37 +03:00
in {
2022-08-14 10:45:17 +03:00
fileSystems."/" = {
device = "none";
fsType = "tmpfs";
options = ["defaults" "size=2G" "mode=755"];
};
fileSystems."/nix" = {
device = byLabel "NIX";
fsType = "f2fs";
2024-03-23 20:59:25 +03:00
options = f2fsOptions;
2022-08-14 10:45:17 +03:00
};
fileSystems."${config.system.persistDir}" = {
device = byLabel "PERSIST";
fsType = "f2fs";
neededForBoot = true;
2024-03-23 20:59:25 +03:00
options = f2fsOptions;
2022-08-14 10:45:17 +03:00
};
fileSystems."/boot" = {
device = byLabel "BOOT";
fsType = "vfat";
};
swapDevices = [];
zramSwap = {
enable = true;
algorithm = "zstd";
};
}