ZFS moved import from postDeviceCommands to postResumeCommands and now my key import doesnt work :( Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
		
			
				
	
	
		
			47 lines
		
	
	
		
			744 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			744 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { lib, pkgs, ... }:
 | |
| {
 | |
| 
 | |
|   boot = {
 | |
|     zfs.requestEncryptionCredentials = lib.mkForce false;
 | |
|     postBootCommands = ''
 | |
|       ${pkgs.zfs}/bin/zfs load-key -a
 | |
|     '';
 | |
|     initrd = {
 | |
|       services.lvm.enable = true;
 | |
|       luks.devices = {
 | |
|         "nixos-pv" = {
 | |
|           device = "/dev/disk/by-uuid/614787a6-784a-4932-b787-cb6424725444";
 | |
|           preLVM = true;
 | |
|           allowDiscards = true;
 | |
|         };
 | |
|       };
 | |
| 
 | |
|     };
 | |
|   };
 | |
| 
 | |
|   fileSystems = {
 | |
|     "/".options = [
 | |
|       "noatime"
 | |
|       "nodiratime"
 | |
|     ];
 | |
| 
 | |
|     "/home".options = [
 | |
|       "noatime"
 | |
|       "nodiratime"
 | |
|     ];
 | |
| 
 | |
|     "/boot".options = [
 | |
|       "noatime"
 | |
|       "nodiratime"
 | |
|       "fmask=0077"
 | |
|       "dmask=0077"
 | |
|     ];
 | |
| 
 | |
|     "/nix".depends = [
 | |
|       "/"
 | |
|       "/crypto"
 | |
|     ];
 | |
| 
 | |
|   };
 | |
| }
 |