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

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

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