forked from jan-leila/nix-config
		
	added assertion
This commit is contained in:
		
							parent
							
								
									6b1eaa7308
								
							
						
					
					
						commit
						b6f1704af3
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		|  | @ -5,7 +5,6 @@ | |||
| }: { | ||||
|   options.host.impermanence.enable = lib.mkEnableOption "are we going to use impermanence on this device"; | ||||
| 
 | ||||
|   # TODO: validate that config.host.storage.enable is enabled | ||||
|   config = lib.mkMerge [ | ||||
|     { | ||||
|       assertions = [ | ||||
|  | @ -19,6 +18,13 @@ | |||
|     } | ||||
|     ( | ||||
|       lib.mkIf config.host.impermanence.enable { | ||||
|         assertions = [ | ||||
|           { | ||||
|             assertion = config.host.impermanence.enable && config.host.storage.enable; | ||||
|             message = "Impermanence can not be used without managed host storage."; | ||||
|           } | ||||
|         ]; | ||||
| 
 | ||||
|         boot.initrd.postResumeCommands = lib.mkAfter '' | ||||
|                     zfs rollback -r rpool/local/system/root@blank | ||||
|           1        ''; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue