diff --git a/hosts/kilgharrah/default.nix b/hosts/kilgharrah/default.nix index e9bc21d..8044b0e 100644 --- a/hosts/kilgharrah/default.nix +++ b/hosts/kilgharrah/default.nix @@ -46,10 +46,18 @@ }; programs.steam.enable = true; + qenya.services.jellyfin = { + enable = true; + domain = "jellyfin.qenya.tel"; + }; randomcat.services.zfs.datasets = { "rpool_albion/data" = { mountpoint = "none"; }; "rpool_albion/data/steam" = { mountpoint = "/home/qenya/.local/share/Steam"; }; + "rpool_albion/state" = { mountpoint = "none"; }; + "rpool_albion/state/jellyfin" = { mountpoint = "/var/lib/jellyfin"; }; + "rpool_albion/srv" = { mountpoint = "none"; }; + "rpool_albion/srv/jellyfin" = { mountpoint = "/srv/jellyfin"; }; }; system.stateVersion = "24.05"; diff --git a/services/default.nix b/services/default.nix index e31416b..809686d 100644 --- a/services/default.nix +++ b/services/default.nix @@ -2,6 +2,7 @@ imports = [ ./actual.nix ./forgejo.nix + ./jellyfin.nix ./pipewire-low-latency.nix ]; } \ No newline at end of file diff --git a/services/jellyfin.nix b/services/jellyfin.nix new file mode 100644 index 0000000..154007d --- /dev/null +++ b/services/jellyfin.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.qenya.services.jellyfin; +in +{ + options.qenya.services.jellyfin = { + enable = mkEnableOption "Jellyfin"; + domain = mkOption { + type = types.str; + }; + }; + + config = mkIf cfg.enable { + services.nginx = { + enable = true; + virtualHosts = { + ${cfg.domain} = { + forceSSL = true; + enableACME = true; + locations."/".proxyPass = "http://127.0.0.1:8096/"; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; + + services.jellyfin.enable = true; + }; +}