forked from jan-leila/nix-config
		
	enabled jellyfin for defiant
This commit is contained in:
		
							parent
							
								
									194287e22a
								
							
						
					
					
						commit
						2a3501fea4
					
				
					 3 changed files with 32 additions and 19 deletions
				
			
		|  | @ -51,20 +51,20 @@ in { | |||
|           ]; | ||||
|         }; | ||||
| 
 | ||||
|         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"; | ||||
|               }; | ||||
|         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"; | ||||
|             }; | ||||
|           } | ||||
|         ]; | ||||
|           }; | ||||
|         }; | ||||
|       }) | ||||
|     ] | ||||
|   ); | ||||
|  |  | |||
|  | @ -6,16 +6,16 @@ | |||
|   options.host.reverse_proxy = { | ||||
|     enable = lib.mkEnableOption "turn on the reverse proxy"; | ||||
|     hostname = lib.mkOption { | ||||
|       type = lib.type.string; | ||||
|       type = lib.types.string; | ||||
|       description = "what host name are we going to be proxying from"; | ||||
|     }; | ||||
|     forceSSL = lib.mkOption { | ||||
|       type = lib.type.boolean; | ||||
|       type = lib.types.bool; | ||||
|       description = "force connections to use https"; | ||||
|       default = true; | ||||
|     }; | ||||
|     enableACME = lib.mkOption { | ||||
|       type = lib.type.boolean; | ||||
|       type = lib.types.bool; | ||||
|       description = "auto renew certificates"; | ||||
|       default = true; | ||||
|     }; | ||||
|  | @ -34,12 +34,17 @@ | |||
| 
 | ||||
|   # TODO: impermanence for ACME keys | ||||
|   config = { | ||||
|     security.acme = lib.mkIf config.host.reverse_proxy.enableACME { | ||||
|       acceptTerms = true; | ||||
|       defaults.email = "jan-leila@protonmail.com"; | ||||
|     }; | ||||
| 
 | ||||
|     services.nginx = { | ||||
|       enable = config.host.reverse_proxy.enable; | ||||
|       virtualHosts = lib.attrsets.mapAttrs' (name: value: | ||||
|         lib.attrsets.nameValuePair "${name}.${config.home.reverse_proxy.hostname}" { | ||||
|           forceSSL = config.home.reverse_proxy.forceSSL; | ||||
|           enableACME = config.home.reverse_proxy.enableACME; | ||||
|         lib.attrsets.nameValuePair "${name}.${config.host.reverse_proxy.hostname}" { | ||||
|           forceSSL = config.host.reverse_proxy.forceSSL; | ||||
|           enableACME = config.host.reverse_proxy.enableACME; | ||||
|           locations."/" = { | ||||
|             proxyPass = value.target; | ||||
|             proxyWebsockets = value.websockets; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue