2022-10-02 17:40:10 +00:00
|
|
|
{ config, lib, ... }: {
|
|
|
|
|
|
|
|
options = {
|
|
|
|
streamServer = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
description = "Hostname for Jellyfin library";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
|
|
|
|
services.jellyfin.enable = true;
|
|
|
|
|
|
|
|
caddyRoutes = [{
|
|
|
|
match = [{ host = [ config.streamServer ]; }];
|
|
|
|
handle = [{
|
|
|
|
handler = "reverse_proxy";
|
|
|
|
upstreams = [{ dial = "localhost:8096"; }];
|
|
|
|
}];
|
|
|
|
}];
|
2022-10-04 22:59:28 +00:00
|
|
|
|
|
|
|
# Create videos directory, allow anyone in Jellyfin group to manage it
|
2022-10-15 19:00:37 +00:00
|
|
|
systemd.tmpfiles.rules =
|
|
|
|
[ "d /var/lib/jellyfin/library 0775 jellyfin jellyfin" ];
|
2022-10-04 22:59:28 +00:00
|
|
|
|
2022-10-02 17:40:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|