kilgharrah: set up jellyfin

This commit is contained in:
Katherina Walshe-Grey 2024-10-02 17:02:35 +01:00
parent 4f85fb54d8
commit 5a617f9cb3
3 changed files with 40 additions and 0 deletions

View file

@ -2,6 +2,7 @@
imports = [
./actual.nix
./forgejo.nix
./jellyfin.nix
./pipewire-low-latency.nix
];
}

31
services/jellyfin.nix Normal file
View file

@ -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;
};
}