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 <