forked from jan-leila/nix-config
		
	updated jellyfin persist folders
This commit is contained in:
		
							parent
							
								
									0d952467cc
								
							
						
					
					
						commit
						e7a53a5df0
					
				
					 1 changed files with 44 additions and 28 deletions
				
			
		|  | @ -7,6 +7,7 @@ | |||
|   jellyfinPort = 8096; | ||||
|   jellyfin_data_directory = "/var/lib/jellyfin"; | ||||
|   jellyfin_cache_directory = "/var/cache/jellyfin"; | ||||
|   jellyfin_media_directory = "/srv/jellyfin/media"; | ||||
| in { | ||||
|   options.host.jellyfin = { | ||||
|     enable = lib.mkEnableOption "should jellyfin be enabled on this computer"; | ||||
|  | @ -31,6 +32,21 @@ in { | |||
|         ]; | ||||
|       } | ||||
|       (lib.mkIf config.host.impermanence.enable { | ||||
|         fileSystems."/persist/system/jellyfin".neededForBoot = true; | ||||
| 
 | ||||
|         host.storage.pool.extraDatasets = { | ||||
|           # sops age key needs to be available to pre persist for user generation | ||||
|           "persist/system/jellyfin" = { | ||||
|             type = "zfs_fs"; | ||||
|             mountpoint = "/persist/system/jellyfin"; | ||||
|             options = { | ||||
|               atime = "off"; | ||||
|               relatime = "off"; | ||||
|               canmount = "on"; | ||||
|             }; | ||||
|           }; | ||||
|         }; | ||||
| 
 | ||||
|         assertions = [ | ||||
|           { | ||||
|             assertion = config.services.jellyfin.dataDir == jellyfin_data_directory; | ||||
|  | @ -42,7 +58,8 @@ in { | |||
|           } | ||||
|         ]; | ||||
| 
 | ||||
|         environment.persistence."/persist/system/jellyfin" = { | ||||
|         environment.persistence = { | ||||
|           "/persist/system/root" = { | ||||
|             enable = true; | ||||
|             hideMounts = true; | ||||
|             directories = [ | ||||
|  | @ -59,18 +76,17 @@ in { | |||
|             ]; | ||||
|           }; | ||||
| 
 | ||||
|         fileSystems."/persist/system/jellyfin".neededForBoot = true; | ||||
| 
 | ||||
|         host.storage.pool.extraDatasets = { | ||||
|           # sops age key needs to be available to pre persist for user generation | ||||
|           "persist/system/jellyfin" = { | ||||
|             type = "zfs_fs"; | ||||
|             mountpoint = "/persist/system/jellyfin"; | ||||
|             options = { | ||||
|               atime = "off"; | ||||
|               relatime = "off"; | ||||
|               canmount = "on"; | ||||
|             }; | ||||
|           "/persist/system/jellyfin" = { | ||||
|             enable = true; | ||||
|             hideMounts = true; | ||||
|             directories = [ | ||||
|               { | ||||
|                 directory = jellyfin_media_directory; | ||||
|                 user = "jellyfin"; | ||||
|                 group = "jellyfin_media"; | ||||
|                 mode = "1770"; | ||||
|               } | ||||
|             ]; | ||||
|           }; | ||||
|         }; | ||||
|       }) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue