set up makemkv persistence
This commit is contained in:
		
							parent
							
								
									7363fc97bc
								
							
						
					
					
						commit
						0f26b73f6a
					
				
					 5 changed files with 45 additions and 2 deletions
				
			
		|  | @ -7,6 +7,12 @@ | |||
| }: { | ||||
|   options.programs.makemkv = { | ||||
|     enable = lib.mkEnableOption "enable makemkv"; | ||||
|     appKeyFile = lib.mkOption { | ||||
|       type = lib.types.str; | ||||
|     }; | ||||
|     destinationDir = lib.mkOption { | ||||
|       type = lib.types.str; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = lib.mkIf config.programs.makemkv.enable (lib.mkMerge [ | ||||
|  | @ -14,11 +20,22 @@ | |||
|       home.packages = with pkgs; [ | ||||
|         makemkv | ||||
|       ]; | ||||
|       # TODO: write config file for makemkv | ||||
| 
 | ||||
|       sops.templates."MakeMKV.settings.conf".content = '' | ||||
|         app_DestinationDir = "${config.programs.makemkv.destinationDir}" | ||||
|         app_DestinationType = "2" | ||||
|         app_Key = "${config.programs.makemkv.appKeyFile}" | ||||
|       ''; | ||||
| 
 | ||||
|       home.file.".MakeMKV/settings.conf".source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."MakeMKV.settings.conf".path; | ||||
|     } | ||||
|     ( | ||||
|       lib.mkIf osConfig.host.impermanence.enable { | ||||
|         # TODO: map impermanence for makemkv | ||||
|         home.persistence."/persist${config.home.homeDirectory}" = { | ||||
|           directories = [ | ||||
|             ".MakeMKV" | ||||
|           ]; | ||||
|         }; | ||||
|       } | ||||
|     ) | ||||
|   ]); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue