2020-01-12 15:20:45 -08:00
|
|
|
# Finally, a decent open alternative to Plex!
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
|
|
|
|
2020-03-28 22:48:43 -07:00
|
|
|
with lib;
|
2020-10-01 15:46:04 -07:00
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.services.jellyfin;
|
|
|
|
in {
|
2020-03-28 22:48:43 -07:00
|
|
|
options.modules.services.jellyfin = {
|
2020-10-01 15:46:04 -07:00
|
|
|
enable = mkBoolOpt false;
|
2020-01-12 15:20:45 -08:00
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
config = mkIf cfg.enable {
|
2020-03-28 22:48:43 -07:00
|
|
|
services.jellyfin.enable = true;
|
|
|
|
|
|
|
|
networking.firewall = {
|
|
|
|
allowedTCPPorts = [ 8096 ];
|
|
|
|
allowedUDPPorts = [ 8096 ];
|
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
user.extraGroups = [ "jellyfin" ];
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
2020-01-12 15:20:45 -08:00
|
|
|
}
|