forked from nyanloutre/nixos-config
migration Emby -> Jellyfin
This commit is contained in:
parent
a93d836d36
commit
b98d0b5bb4
@ -58,6 +58,7 @@ let
|
|||||||
''
|
''
|
||||||
backend ${name}-backend
|
backend ${name}-backend
|
||||||
mode http
|
mode http
|
||||||
|
${value.extraBackend}
|
||||||
${(
|
${(
|
||||||
if value.socket == "" then
|
if value.socket == "" then
|
||||||
''
|
''
|
||||||
@ -100,6 +101,7 @@ in
|
|||||||
port = mkOption { type = int; description = "Port number"; };
|
port = mkOption { type = int; description = "Port number"; };
|
||||||
socket = mkOption { type = str; description = "Emplacement du socket"; default = ""; };
|
socket = mkOption { type = str; description = "Emplacement du socket"; default = ""; };
|
||||||
auth = mkOption { type = bool; description = "Enable authentification"; default = false; };
|
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 = ""; };
|
extraAcls = mkOption { type = str; description = "ACL HaProxy suplémentaires"; default = ""; };
|
||||||
aclBool = mkOption { type = str; description = "Logique d'authentification"; default = "!AUTH_OK"; };
|
aclBool = mkOption { type = str; description = "Logique d'authentification"; default = "!AUTH_OK"; };
|
||||||
}; });
|
}; });
|
||||||
|
@ -12,6 +12,17 @@ let
|
|||||||
factorio_port = 52351;
|
factorio_port = 52351;
|
||||||
airsonic_port = 4040;
|
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" ''
|
login_mail_alert = pkgs.writeShellScriptBin "mail_alert.sh" ''
|
||||||
if [ "$PAM_TYPE" != "close_session" ]; then
|
if [ "$PAM_TYPE" != "close_session" ]; then
|
||||||
${pkgs.system-sendmail}/bin/sendmail paul@nyanlout.re <<EOF
|
${pkgs.system-sendmail}/bin/sendmail paul@nyanlout.re <<EOF
|
||||||
@ -60,9 +71,9 @@ in
|
|||||||
domaine = domaine;
|
domaine = domaine;
|
||||||
services = {
|
services = {
|
||||||
"grafana.${domaine}" = { ip = "127.0.0.1"; port = 3000; auth = true; };
|
"grafana.${domaine}" = { ip = "127.0.0.1"; port = 3000; auth = true; };
|
||||||
"emby.${domaine}" = { ip = "127.0.0.1"; port = 8096; auth = false; };
|
"emby.${domaine}" = { ip = "127.0.0.1"; port = 8096; auth = false; extraBackend = jellyfin_backend; };
|
||||||
"radarr.${domaine}" = { ip = "127.0.0.1"; port = 7878; auth = true; extraAcls = "acl API path_beg /api\n"; aclBool = "!AUTH_OK !API"; };
|
"radarr.${domaine}" = { ip = "127.0.0.1"; port = 7878; auth = true; extraAcls = sonarr_acl; aclBool = sonarr_auth; };
|
||||||
"sonarr.${domaine}" = { ip = "127.0.0.1"; port = 8989; auth = true; extraAcls = "acl API path_beg /api\n"; aclBool = "!AUTH_OK !API"; };
|
"sonarr.${domaine}" = { ip = "127.0.0.1"; port = 8989; auth = true; extraAcls = sonarr_acl; aclBool = sonarr_auth; };
|
||||||
"transmission.${domaine}" = { ip = "127.0.0.1"; port = 9091; auth = true; };
|
"transmission.${domaine}" = { ip = "127.0.0.1"; port = 9091; auth = true; };
|
||||||
"syncthing.${domaine}" = { ip = "127.0.0.1"; port = 8384; auth = true; };
|
"syncthing.${domaine}" = { ip = "127.0.0.1"; port = 8384; auth = true; };
|
||||||
"jackett.${domaine}" = { ip = "127.0.0.1"; port = 9117; auth = true; };
|
"jackett.${domaine}" = { ip = "127.0.0.1"; port = 9117; auth = true; };
|
||||||
@ -174,10 +185,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
emby = {
|
jellyfin.enable = true;
|
||||||
enable = true;
|
|
||||||
dataDir = "/var/lib/emby/ProgramData-Server";
|
|
||||||
};
|
|
||||||
|
|
||||||
slimserver = {
|
slimserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -308,7 +316,7 @@ in
|
|||||||
paths = [
|
paths = [
|
||||||
"/var/certs"
|
"/var/certs"
|
||||||
"/var/dkim"
|
"/var/dkim"
|
||||||
"/var/lib/emby"
|
"/var/lib/jellyfin"
|
||||||
"/var/lib/gitea"
|
"/var/lib/gitea"
|
||||||
"/var/lib/grafana"
|
"/var/lib/grafana"
|
||||||
"/var/lib/jackett"
|
"/var/lib/jackett"
|
||||||
|
Loading…
Reference in New Issue
Block a user