flake/modules/jellyfin.nix
2025-02-07 16:45:08 +03:00

28 lines
546 B
Nix

{
config,
pkgs,
lib,
...
}: {
options = {
myModules.enableJellyfin = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Jellyfin media server";
};
};
config = lib.mkMerge [
(lib.mkIf config.myModules.enableJellyfin {
services.jellyfin = {
enable = true;
openFirewall = true;
user = "osbm";
group = "users";
dataDir = "/home/osbm/.local/share/jellyfin";
};
networking.firewall.allowedTCPPorts = [8096];
})
];
}