mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 07:32:55 +00:00
29 lines
594 B
Nix
29 lines
594 B
Nix
{ 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"; }];
|
|
}];
|
|
}];
|
|
|
|
# Create videos directory, allow anyone in Jellyfin group to manage it
|
|
systemd.tmpfiles.rules =
|
|
[ "d /var/lib/jellyfin/library 0775 jellyfin jellyfin" ];
|
|
|
|
};
|
|
|
|
}
|