extract jellyfin to video-library role
2 files changed, 37 insertions(+), 25 deletions(-)
changed files
M system/hosts/linde.nix → system/hosts/linde.nix
@@ -40,11 +40,11 @@ ../roles/mailer.nix ../roles/readeck.nix ../roles/searchix.nix ../roles/sso.nix + ../roles/video-library.nix ../settings/services/git-server.nix ]; age.secrets = { redis-website.file = ../../secrets/redis-website.age; - cifs-jellyfin.file = ../../secrets/cifs-jellyfin.age; ntfy.file = ../../secrets/ntfy.age; };@@ -355,11 +355,6 @@ extraConfig = '' redir https://{labels.2}.${domain}{uri} ''; }; - "jf.${domain}" = { - extraConfig = '' - reverse_proxy localhost:8096 - ''; - }; "ntfy.${domain}" = { extraConfig = '' reverse_proxy ${config.services.ntfy-sh.settings.listen-http}@@ -408,23 +403,4 @@ }; environmentFile = config.age.secrets.ntfy.path; }; - fileSystems."/srv/video" = { - device = "//u439959-sub5.your-storagebox.de/u439959-sub5"; - fsType = "smb3"; - options = [ - "x-systemd.automount" - "noauto" - "x-systemd.mount-timeout=5s" - "credentials=${config.age.secrets.cifs-jellyfin.path}" - "seal" - "multichannel" - "forceuid" - "forcegid" - "uid=jellyfin" - "gid=jellyfin" - ]; - }; - services.jellyfin = { - enable = true; - }; }
A system/roles/video-library.nix
@@ -0,0 +1,36 @@ +{ + config, + ... +}: +{ + age.secrets.cifs-jellyfin.file = ../../secrets/cifs-jellyfin.age; + + fileSystems."/srv/video" = { + device = "//u439959-sub5.your-storagebox.de/u439959-sub5"; + fsType = "smb3"; + options = [ + "x-systemd.automount" + "noauto" + "x-systemd.mount-timeout=5s" + "credentials=${config.age.secrets.cifs-jellyfin.path}" + "seal" + "multichannel" + "forceuid" + "forcegid" + "uid=jellyfin" + "gid=jellyfin" + ]; + }; + + services.jellyfin = { + enable = true; + }; + + services.caddy.virtualHosts = { + "jf.${config.networking.domain}" = { + extraConfig = '' + reverse_proxy localhost:8096 + ''; + }; + }; +}