nix/modules/home/containers/jellyfin.nix
2025-06-03 19:41:07 +02:00

36 lines
742 B
Nix

{ config, lib, ... }:
with lib;
let
cfg = config.settings.containers.jellyfin;
in {
options = {
settings.containers.jellyfin.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enable jellyfin container
'';
};
};
config = mkIf cfg.enable {
services.podman.containers.jellyfin = {
image = "jellyfin/jellyfin";
network = "proxy";
volumes = [
"%h/containers/jellyfin/config:/config"
"%h/containers/jellyfin/cache:/cache"
"%h/media:/media"
];
userNS = "keep-id";
};
settings.containers.caddy.routes.tbmrs-local.routes.jellyfin = {
host = "stream";
url = "jellyfin:8096";
};
};
}