mirror of
				https://github.com/Stunkymonkey/nixos.git
				synced 2025-10-31 09:42:11 +01:00 
			
		
		
		
	machine/serverle: fix disko formatting file
This commit is contained in:
		
							parent
							
								
									c958967e5b
								
							
						
					
					
						commit
						8f0a147cb3
					
				
					 2 changed files with 59 additions and 61 deletions
				
			
		|  | @ -1,71 +1,72 @@ | |||
| { disks ? [ "/dev/sda" ], ... }: | ||||
| { | ||||
|   disk = { | ||||
|     vdb = { | ||||
|       type = "disk"; | ||||
|       device = builtins.head disks; | ||||
|       content = { | ||||
|         type = "gpt"; | ||||
|         partitions = { | ||||
|           boot = { | ||||
|             size = "1M"; | ||||
|             type = "EF02"; # for grub MBR | ||||
|           }; | ||||
|           ESP = { | ||||
|             size = "512M"; | ||||
|             type = "EF00"; | ||||
|             content = { | ||||
|               type = "filesystem"; | ||||
|               format = "vfat"; | ||||
|               mountpoint = "/boot"; | ||||
|               mountOptions = [ | ||||
|                 "defaults" | ||||
|               ]; | ||||
|   disko.devices = { | ||||
|     disk = { | ||||
|       vdb = { | ||||
|         type = "disk"; | ||||
|         device = "/dev/disk/by-id/usb-Seagate_Expansion_2HC015KJ-0:0"; | ||||
|         content = { | ||||
|           type = "gpt"; | ||||
|           partitions = { | ||||
|             boot = { | ||||
|               size = "1M"; | ||||
|               type = "EF02"; # for grub MBR | ||||
|             }; | ||||
|           }; | ||||
|           luks = { | ||||
|             size = "100%"; | ||||
|             content = { | ||||
|               type = "luks"; | ||||
|               name = "encrypted"; | ||||
|               extraOpenArgs = [ "--allow-discards" ]; | ||||
|               passwordFile = "/tmp/disk.key"; | ||||
|             ESP = { | ||||
|               size = "512M"; | ||||
|               type = "EF00"; | ||||
|               content = { | ||||
|                 type = "lvm_pv"; | ||||
|                 vg = "pool"; | ||||
|                 type = "filesystem"; | ||||
|                 format = "vfat"; | ||||
|                 mountpoint = "/boot"; | ||||
|                 mountOptions = [ | ||||
|                   "defaults" | ||||
|                 ]; | ||||
|               }; | ||||
|             }; | ||||
|             luks = { | ||||
|               size = "100%"; | ||||
|               content = { | ||||
|                 type = "luks"; | ||||
|                 name = "encrypted"; | ||||
|                 extraOpenArgs = [ "--allow-discards" ]; | ||||
|                 passwordFile = "/tmp/disk.key"; | ||||
|                 content = { | ||||
|                   type = "lvm_pv"; | ||||
|                   vg = "pool"; | ||||
|                 }; | ||||
|               }; | ||||
|             }; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|   lvm_vg = { | ||||
|     pool = { | ||||
|       type = "lvm_vg"; | ||||
|       lvs = { | ||||
|         root = { | ||||
|           size = "50G"; | ||||
|           content = { | ||||
|             type = "filesystem"; | ||||
|             format = "ext4"; | ||||
|             mountpoint = "/"; | ||||
|     lvm_vg = { | ||||
|       pool = { | ||||
|         type = "lvm_vg"; | ||||
|         lvs = { | ||||
|           root = { | ||||
|             size = "50G"; | ||||
|             content = { | ||||
|               type = "filesystem"; | ||||
|               format = "ext4"; | ||||
|               mountpoint = "/"; | ||||
|             }; | ||||
|           }; | ||||
|         }; | ||||
|         data = { | ||||
|           size = "400G"; | ||||
|           content = { | ||||
|             type = "filesystem"; | ||||
|             format = "ext4"; | ||||
|             mountpoint = "/data"; | ||||
|           data = { | ||||
|             size = "400G"; | ||||
|             content = { | ||||
|               type = "filesystem"; | ||||
|               format = "ext4"; | ||||
|               mountpoint = "/data"; | ||||
|             }; | ||||
|           }; | ||||
|         }; | ||||
|         swap = { | ||||
|           size = "4G"; | ||||
|           content = { | ||||
|             type = "swap"; | ||||
|             randomEncryption = true; | ||||
|             resumeDevice = true; | ||||
|           swap = { | ||||
|             size = "4G"; | ||||
|             content = { | ||||
|               type = "swap"; | ||||
|               randomEncryption = true; | ||||
|               resumeDevice = true; | ||||
|             }; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Felix Buehler
						Felix Buehler