From b98d0b5bb4e88f858cadea79dac4978f21ad73f9 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Sat, 15 Jun 2019 14:36:14 +0200 Subject: [PATCH] migration Emby -> Jellyfin --- services/haproxy-acme.nix | 2 ++ systems/LoutreOS/services.nix | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/services/haproxy-acme.nix b/services/haproxy-acme.nix index 96d28cd..74a4dfe 100644 --- a/services/haproxy-acme.nix +++ b/services/haproxy-acme.nix @@ -58,6 +58,7 @@ let '' backend ${name}-backend mode http + ${value.extraBackend} ${( if value.socket == "" then '' @@ -100,6 +101,7 @@ in port = mkOption { type = int; description = "Port number"; }; socket = mkOption { type = str; description = "Emplacement du socket"; default = ""; }; auth = mkOption { type = bool; description = "Enable authentification"; default = false; }; + extraBackend = mkOption { type = str; description = "Options backend HaProxy suplémentaires"; default = ""; }; extraAcls = mkOption { type = str; description = "ACL HaProxy suplémentaires"; default = ""; }; aclBool = mkOption { type = str; description = "Logique d'authentification"; default = "!AUTH_OK"; }; }; }); diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index 36493fe..ebef955 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -12,6 +12,17 @@ let factorio_port = 52351; airsonic_port = 4040; + jellyfin_backend = '' + http-request set-header X-Forwarded-Port %[dst_port] + http-request add-header X-Forwarded-Proto https if { ssl_fc } + ''; + sonarr_acl = '' + acl API path_beg /api + ''; + sonarr_auth = '' + !AUTH_OK !API + ''; + login_mail_alert = pkgs.writeShellScriptBin "mail_alert.sh" '' if [ "$PAM_TYPE" != "close_session" ]; then ${pkgs.system-sendmail}/bin/sendmail paul@nyanlout.re <