add disko (unused)
This commit is contained in:
		
							parent
							
								
									7ef8033b53
								
							
						
					
					
						commit
						2b211cc29d
					
				
							
								
								
									
										11
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								flake.nix
									
									
									
									
									
								
							|  | @ -17,8 +17,10 @@ | |||
|     agenix.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     deploy-rs.url = "github:serokell/deploy-rs"; | ||||
|     deploy-rs.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     disko.url = "github:nix-community/disko"; | ||||
|     disko.inputs.nixpkgs.follows = "nixpkgs"; | ||||
| 
 | ||||
|     # Packages | ||||
|     # My Packages | ||||
|     poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main"; | ||||
|     poonam.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main"; | ||||
|  | @ -26,11 +28,12 @@ | |||
|     basant.inputs.nixpkgs.follows = "nixpkgs"; | ||||
|     basant.inputs.poonam.follows = "poonam"; | ||||
|     vimwikicli.inputs.nixpkgs.follows = "nixpkgs"; | ||||
| 
 | ||||
|     grasp.url = "git+ssh://gitea@git.sealight.xyz/aynish/grasp.git?ref=main"; | ||||
|     grasp.inputs.nixpkgs.follows = "nixpkgs"; | ||||
| 
 | ||||
|     # Matrix | ||||
|     nix-matrix-appservices.url = "gitlab:coffeetables/nix-matrix-appservices"; | ||||
| 
 | ||||
|     # Others | ||||
|     nur.url = "github:nix-community/NUR"; | ||||
|     rust-overlay = { | ||||
|  | @ -63,6 +66,7 @@ | |||
|     , home-manager | ||||
|     , deploy-rs | ||||
|     , agenix | ||||
|     , disko | ||||
|     , basant | ||||
|     , grasp | ||||
|     , nix-matrix-appservices | ||||
|  | @ -184,6 +188,7 @@ | |||
|             self.nixosModules.backup | ||||
|             self.nixosModules.wireguard | ||||
|             self.nixosModules.microbin | ||||
|             disko.nixosModules.disko | ||||
|           ]; | ||||
|         }; | ||||
| 
 | ||||
|  | @ -275,7 +280,7 @@ | |||
|         }; | ||||
|         helix = { | ||||
|           hostname = "git.sealight.xyz"; | ||||
|           # autoRollback = false; | ||||
|           autoRollback = false; | ||||
|           profiles.system = { | ||||
|             user = "root"; | ||||
|             path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.helix; | ||||
|  |  | |||
							
								
								
									
										51
									
								
								hosts/helix/disko.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								hosts/helix/disko.nix
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,51 @@ | |||
| { disks ? [ "/dev/vdb" ], ... }: { | ||||
|   disko.devices = { | ||||
|     disk = { | ||||
|       vdb = { | ||||
|         type = "disk"; | ||||
|         device = builtins.elemAt disks 0; | ||||
|         content = { | ||||
|           type = "table"; | ||||
|           format = "gpt"; | ||||
|           partitions = [ | ||||
|             { | ||||
|               name = "ESP"; | ||||
|               start = "1MiB"; | ||||
|               end = "128MiB"; | ||||
|               fs-type = "fat32"; | ||||
|               bootable = true; | ||||
|               content = { | ||||
|                 type = "filesystem"; | ||||
|                 format = "vfat"; | ||||
|                 mountpoint = "/boot"; | ||||
|               }; | ||||
|             } | ||||
|             { | ||||
|               name = "root"; | ||||
|               start = "128MiB"; | ||||
|               end = "100%"; | ||||
|               content = { | ||||
|                 type = "btrfs"; | ||||
|                 extraArgs = [ "-f" ]; # Override existing partition | ||||
|                 subvolumes = { | ||||
|                   # Subvolume name is different from mountpoint | ||||
|                   "/rootfs" = { | ||||
|                     mountpoint = "/"; | ||||
|                   }; | ||||
|                   # Mountpoints inferred from subvolume name | ||||
|                   "/home" = { | ||||
|                     mountOptions = [ "compress=zstd" ]; | ||||
|                   }; | ||||
|                   "/nix" = { | ||||
|                     mountOptions = [ "compress=zstd" "noatime" ]; | ||||
|                   }; | ||||
|                 }; | ||||
|               }; | ||||
|             } | ||||
|           ]; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
| 
 | ||||
		Loading…
	
		Reference in a new issue