forked from jan-leila/nix-config
		
	moved service config out of host namespace
This commit is contained in:
		
							parent
							
								
									c7938c3fe7
								
							
						
					
					
						commit
						597c25b49d
					
				
					 7 changed files with 98 additions and 125 deletions
				
			
		|  | @ -8,8 +8,7 @@ | |||
|   jellyfin_data_directory = "/var/lib/jellyfin"; | ||||
|   jellyfin_cache_directory = "/var/cache/jellyfin"; | ||||
| in { | ||||
|   options.host.jellyfin = { | ||||
|     enable = lib.mkEnableOption "should jellyfin be enabled on this computer"; | ||||
|   options.services.jellyfin = { | ||||
|     subdomain = lib.mkOption { | ||||
|       type = lib.types.str; | ||||
|       description = "subdomain of base domain that jellyfin will be hosted at"; | ||||
|  | @ -27,16 +26,14 @@ in { | |||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = lib.mkIf config.host.jellyfin.enable ( | ||||
|   config = lib.mkIf config.services.jellyfin.enable ( | ||||
|     lib.mkMerge [ | ||||
|       { | ||||
|         services.jellyfin.enable = true; | ||||
| 
 | ||||
|         host.reverse_proxy.subdomains.jellyfin = { | ||||
|           target = "http://localhost:${toString jellyfinPort}"; | ||||
| 
 | ||||
|           subdomain = config.host.jellyfin.subdomain; | ||||
|           extraSubdomains = config.host.jellyfin.extraSubdomains; | ||||
|           subdomain = config.services.jellyfin.subdomain; | ||||
|           extraSubdomains = config.services.jellyfin.extraSubdomains; | ||||
| 
 | ||||
|           forwardHeaders.enable = true; | ||||
| 
 | ||||
|  | @ -107,8 +104,6 @@ in { | |||
| 
 | ||||
|         environment.persistence = { | ||||
|           "/persist/system/root" = { | ||||
|             enable = true; | ||||
|             hideMounts = true; | ||||
|             directories = [ | ||||
|               { | ||||
|                 directory = jellyfin_data_directory; | ||||
|  | @ -128,7 +123,7 @@ in { | |||
|             hideMounts = true; | ||||
|             directories = [ | ||||
|               { | ||||
|                 directory = config.host.jellyfin.media_directory; | ||||
|                 directory = config.services.jellyfin.media_directory; | ||||
|                 user = "jellyfin"; | ||||
|                 group = "jellyfin_media"; | ||||
|                 mode = "1770"; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue