nix machine / user configurations
at terra 770 B view raw
1{ config, ... }: 2let 3 byLabel = label: "/dev/disk/by-label/${label}"; 4 f2fsOptions = [ 5 "compress_algorithm=zstd:6" 6 "compress_chksum" 7 "atgc" 8 "gc_merge" 9 "lazytime" 10 ]; 11in 12{ 13 fileSystems."/" = { 14 device = "none"; 15 fsType = "tmpfs"; 16 options = [ 17 "defaults" 18 "size=2G" 19 "mode=755" 20 ]; 21 }; 22 fileSystems."/nix" = { 23 device = byLabel "NIX"; 24 fsType = "f2fs"; 25 options = f2fsOptions; 26 }; 27 fileSystems."${config.system.persistDir}" = { 28 device = byLabel "PERSIST"; 29 fsType = "f2fs"; 30 neededForBoot = true; 31 options = f2fsOptions; 32 }; 33 fileSystems."/boot" = { 34 device = byLabel "BOOT"; 35 fsType = "vfat"; 36 }; 37 38 swapDevices = [ ]; 39 zramSwap = { 40 enable = true; 41 algorithm = "zstd"; 42 }; 43}