From 6a3327386fbec155b268eb7dd5f46c7018cee507 Mon Sep 17 00:00:00 2001 From: soraefir Date: Thu, 14 May 2026 00:59:26 +0200 Subject: [PATCH] home&script --- modules/server/containers/apps/jellyfin.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/server/containers/apps/jellyfin.nix b/modules/server/containers/apps/jellyfin.nix index 0c584a1..3dd63bf 100644 --- a/modules/server/containers/apps/jellyfin.nix +++ b/modules/server/containers/apps/jellyfin.nix @@ -9,7 +9,6 @@ let Entrypoint = [ "${pkgs.jellyfin}/bin/jellyfin" ]; ExposedPorts = { "8096/tcp" = { }; }; Env = [ - "HOME=/tmp" "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" "NIX_SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ]; @@ -42,6 +41,7 @@ in { # imageFile = image; port = 8096; extraEnv = { + HOME = "/config/data"; DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = "1"; JELLYFIN_WEB_DIR = "${pkgs.jellyfin-web}/share/jellyfin-web"; JELLYFIN_HttpListenerHost__BindAddress= "0.0.0.0"; #we can use settings.xml override @@ -84,30 +84,30 @@ in { exit 0 fi - if ! ${pkgs.curl}/bin/curl -sSf -X POST "''$JELLYFIN_URL/Startup/Configuration" \ + if ! ${pkgs.curl}/bin/curl -sSf -X POST "$JELLYFIN_URL/Startup/Configuration" \ -H "Content-Type: application/json" \ - -d '{"ServerName":"jellyfin","UICulture":"en-US","MetadataCountryCode":"US","PreferredMetadataLanguage":"en"}'; then + -d '{"ServerName":"Flix","UICulture":"en-US","MetadataCountryCode":"US","PreferredMetadataLanguage":"en"}'; then echo "ERROR: Failed to set startup configuration." exit 1 fi SETUP_USER_PAYLOAD=$(${pkgs.jq}/bin/jq -n \ - --arg name "''\${DEFAULT_ADMIN_USERNAME}" \ - --arg pass "''\${DEFAULT_ADMIN_PASSWORD}" \ + --arg name "$DEFAULT_ADMIN_USERNAME" \ + --arg pass "$DEFAULT_ADMIN_PASSWORD" \ '{"Name": $name, "Password": $pass}') - echo "Payload to be sent to /Startup/User: ''$SETUP_USER_PAYLOAD" + echo "Payload to be sent to /Startup/User: $SETUP_USER_PAYLOAD" - if ! ${pkgs.curl}/bin/curl -sSf -X POST "''$JELLYFIN_URL/Startup/User" \ + if ! ${pkgs.curl}/bin/curl -sSf -X POST "$JELLYFIN_URL/Startup/User" \ -H 'accept: */*' \ -H "Content-Type: application/json" \ - -d "''${SETUP_USER_PAYLOAD}"; then + -d "$SETUP_USER_PAYLOAD"; then echo "ERROR: Failed to set admin user." exit 1 fi # Enable remote access, disable UPnP auto-mapping - if ! ${pkgs.curl}/bin/curl -sSf -X POST "''$JELLYFIN_URL/Startup/RemoteAccess" \ + if ! ${pkgs.curl}/bin/curl -sSf -X POST "$JELLYFIN_URL/Startup/RemoteAccess" \ -H "Content-Type: application/json" \ -d '{"EnableRemoteAccess":true,"EnableAutomaticPortMapping":false}'; then echo "ERROR: Failed to configure remote access."