{config,...}: # to use this, you must have created the lvm devices for the host # in this example, my hostname is sobble and the disk is /dev/sda: # # fdisk /dev/sda # n # new partition, assuming this is a blank disk. # # (enter for all defauls until you're back at the prompt) # t # set type # 1 # first partition, again assuming this was a blank disk # 8e # lvm # w # write and quit # # pvcreate /dev/sda1 # vgcreate sobble-tank-ssd /dev/sda1 # lvcreate -l 100%FREE -n sobble-tank-ssd sobble-tank-ssd # mkfs.ext4 /dev/sobble-tank-ssd/sobble-tank-ssd let n = "${config.networking.hostName}-tank-ssd"; in { fileSystems."/tank/ssd" = { device = "/dev/${n}/${n}"; fsType = "ext4"; }; }