Move jellyfin configuration
All checks were successful
/ check (push) Successful in 1m28s

This commit is contained in:
Oliver Davies 2025-06-24 00:35:30 +01:00
parent d25628813b
commit e8284d322b
5 changed files with 24 additions and 67 deletions

View file

@ -11,6 +11,7 @@
../common
./hardware-configuration.nix
./homelab.nix
./jellyfin.nix
./modules
./ports.nix
./secrets.nix

View file

@ -13,7 +13,6 @@
home-assistant.enable = true;
homepage-dashboard.enable = true;
immich.enable = true;
jellyfin.enable = true;
jitsi.enable = true;
paperless.enable = true;
peertube.enable = true;

23
hosts/nixedo/jellyfin.nix Normal file
View file

@ -0,0 +1,23 @@
{
services.jellyfin = {
enable = true;
configDir = "/mnt/media/jellyfin";
group = "media";
openFirewall = true;
};
services.nginx.virtualHosts."jellyfin.oliverdavies.uk" = {
forceSSL = true;
useACMEHost = "oliverdavies.uk";
locations."/" = {
proxyPass = "http://localhost:8096";
recommendedProxySettings = true;
extraConfig = ''
proxy_buffering off;
'';
};
};
}

View file

@ -25,7 +25,6 @@ with lib;
./forgejo.nix
./home-assistant.nix
./immich.nix
./jellyfin.nix
./jitsi.nix
./nginx
./paperless.nix

View file

@ -1,65 +0,0 @@
{ config, lib, ... }:
with lib;
let
cfg = homelab.services.${service};
homelab = config.homelab;
service = "jellyfin";
in
{
options.homelab.services.${service} = {
enable = mkEnableOption "Enable ${service}";
url = mkOption {
default = "${service}.${homelab.domain}";
type = types.str;
};
homepage.name = mkOption {
default = "Jellyfin";
type = types.str;
};
homepage.description = mkOption {
default = "The Free Software Media System";
type = types.str;
};
homepage.icon = mkOption {
default = "jellyfin";
type = types.str;
};
homepage.category = mkOption {
default = "Media";
type = types.str;
};
};
config = mkIf cfg.enable {
services = {
${service} = {
enable = true;
configDir = "/mnt/media/${service}";
group = "media";
openFirewall = true;
};
nginx.virtualHosts."${cfg.url}" = {
forceSSL = true;
useACMEHost = homelab.domain;
locations."/" = {
proxyPass = "http://localhost:8096";
recommendedProxySettings = true;
extraConfig = ''
proxy_buffering off;
'';
};
};
};
};
}