This commit is contained in:
parent
d25628813b
commit
e8284d322b
5 changed files with 24 additions and 67 deletions
|
@ -11,6 +11,7 @@
|
||||||
../common
|
../common
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./homelab.nix
|
./homelab.nix
|
||||||
|
./jellyfin.nix
|
||||||
./modules
|
./modules
|
||||||
./ports.nix
|
./ports.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
home-assistant.enable = true;
|
home-assistant.enable = true;
|
||||||
homepage-dashboard.enable = true;
|
homepage-dashboard.enable = true;
|
||||||
immich.enable = true;
|
immich.enable = true;
|
||||||
jellyfin.enable = true;
|
|
||||||
jitsi.enable = true;
|
jitsi.enable = true;
|
||||||
paperless.enable = true;
|
paperless.enable = true;
|
||||||
peertube.enable = true;
|
peertube.enable = true;
|
||||||
|
|
23
hosts/nixedo/jellyfin.nix
Normal file
23
hosts/nixedo/jellyfin.nix
Normal 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;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -25,7 +25,6 @@ with lib;
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
./home-assistant.nix
|
./home-assistant.nix
|
||||||
./immich.nix
|
./immich.nix
|
||||||
./jellyfin.nix
|
|
||||||
./jitsi.nix
|
./jitsi.nix
|
||||||
./nginx
|
./nginx
|
||||||
./paperless.nix
|
./paperless.nix
|
||||||
|
|
|
@ -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;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue