{ inputs, ... }: { imports = [ inputs.disko.nixosModules.default ]; disko.devices = { disk.main = { type = "disk"; device = "/dev/nvme0n1"; content = { type = "gpt"; partitions = { ESP = { type = "EF00"; size = "512M"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "defaults" ]; }; }; luks = { size = "100%"; content = { name = "cryptroot"; type = "luks"; settings = { allowDiscards = true; bypassWorkqueues = true; }; passwordFile = "/tmp/secret.key"; content = { type = "lvm_pv"; vg = "pool"; }; }; }; }; }; }; lvm_vg.pool = { type = "lvm_vg"; lvs = { swap = { size = "20G"; content = { type = "swap"; resumeDevice = true; }; }; root = { size = "100%FREE"; content = { type = "filesystem"; format = "ext4"; mountpoint = "/"; mountOptions = [ "defaults" ]; }; }; }; }; }; }