add disko
This commit is contained in:
		
							parent
							
								
									a7f6983abe
								
							
						
					
					
						commit
						3c09386643
					
				
					 3 changed files with 45 additions and 63 deletions
				
			
		
							
								
								
									
										41
									
								
								hosts/partition/i15.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								hosts/partition/i15.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,41 @@
 | 
			
		|||
{ disks ? [ "/dev/sda" ], ... }: {
 | 
			
		||||
  disk.sda = {
 | 
			
		||||
    type = "disk";
 | 
			
		||||
    device = builtins.elemAt disks 0;
 | 
			
		||||
    content = {
 | 
			
		||||
      type = "table";
 | 
			
		||||
      format = "gpt";
 | 
			
		||||
      partitions = [
 | 
			
		||||
        {
 | 
			
		||||
          type = "partition";
 | 
			
		||||
          name = "NIX_BOOT";
 | 
			
		||||
          start = "1MiB";
 | 
			
		||||
          end = "1GiB";
 | 
			
		||||
          bootable = true;
 | 
			
		||||
          content = {
 | 
			
		||||
            type = "filesystem";
 | 
			
		||||
            format = "vfat";
 | 
			
		||||
            mountpoint = "/boot";
 | 
			
		||||
            options = [ "defaults" ];
 | 
			
		||||
          };
 | 
			
		||||
        }
 | 
			
		||||
        {
 | 
			
		||||
          type = "partition";
 | 
			
		||||
          name = "NIX_CRYPT_ROOT";
 | 
			
		||||
          start = "1GiB";
 | 
			
		||||
          end = "100%";
 | 
			
		||||
          content = {
 | 
			
		||||
            type = "luks";
 | 
			
		||||
            name = "main";
 | 
			
		||||
            content = {
 | 
			
		||||
              type = "btrfs";
 | 
			
		||||
              name = "BTRFS_ROOT";
 | 
			
		||||
              mountpoint = "/";
 | 
			
		||||
              subvolumes = [ "/home" "/nixos" "/swap" ];
 | 
			
		||||
            };
 | 
			
		||||
          };
 | 
			
		||||
        }
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue