34 lines
690 B
Nix
34 lines
690 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.naxos.apps.jellyfin;
|
|
in {
|
|
options.services.naxos.apps.jellyfin = {
|
|
enable = mkEnableOption "Jellyfin Open-Source Media Streaming Server";
|
|
|
|
openFirewall = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
description = "Open port 8096 in firewall.";
|
|
};
|
|
|
|
user = mkOption {
|
|
type = types.str;
|
|
default = "jellyfin";
|
|
description = "Service user.";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.jellyfin = {
|
|
enable = true;
|
|
openFirewall = cfg.openFirewall;
|
|
user = cfg.user;
|
|
};
|
|
|
|
users.users.${cfg.user}.extraGroups = [ "video" "render" ];
|
|
};
|
|
}
|