refactor: jellyfin module > all in one mediaServer Module
This commit is contained in:
		
							parent
							
								
									170cfe7f3c
								
							
						
					
					
						commit
						f569b47347
					
				
					 5 changed files with 53 additions and 63 deletions
				
			
		
							
								
								
									
										49
									
								
								system/modules/services/mediaServer/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								system/modules/services/mediaServer/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,49 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.systemModules.services.mediaServer; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
| 
 | ||||
|     users.groups.media = { }; | ||||
| 
 | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       jellyfin | ||||
|       jellyfin-web | ||||
|       jellyfin-ffmpeg  | ||||
|     ]; | ||||
| 
 | ||||
|     services = { | ||||
|       jellyfin = { | ||||
|         group = "media"; | ||||
|         enable = true; | ||||
|         openFirewall = true; | ||||
|       }; | ||||
|       deluge = { | ||||
|         group = "media"; | ||||
|         enable = true; | ||||
|         web.enable = true; | ||||
|       }; | ||||
|       radarr = { | ||||
|         group = "media"; | ||||
|         enable = true; | ||||
|       }; | ||||
|       sonarr = { | ||||
|         group = "media"; | ||||
|         enable = true; | ||||
|       }; | ||||
|       prowlarr.enable = true; | ||||
|     }; | ||||
| 
 | ||||
|     systemd.tmpfiles.rules = [ | ||||
|       "d /jellyfin 0770 - media - -" | ||||
|     ]; | ||||
| 
 | ||||
|     fileSystems."/jellyfin" = { | ||||
|       device = "/dev/disk/by-label/jellyfin"; | ||||
|       fsType = "btrfs"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue