46 lines
841 B
Nix
46 lines
841 B
Nix
# manages and downloads films
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.profiles.jellyfin;
|
|
hostName = config.networking.hostName;
|
|
port = 8096;
|
|
in
|
|
{
|
|
options.my.profiles.jellyfin = with lib; {
|
|
enable = mkEnableOption "Media Service";
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.jellyfin = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.libva-utils ];
|
|
|
|
my.homepage.services = [
|
|
{
|
|
group = "Media";
|
|
name = "Jellyfin";
|
|
description = "Media server";
|
|
href = "http://${hostName}:${toString port}";
|
|
icon = "jellyfin.png";
|
|
}
|
|
];
|
|
|
|
systemd.services.jellyfin = {
|
|
after = [ "network-online.target" ];
|
|
serviceConfig.SupplementaryGroups = [
|
|
"video"
|
|
"render"
|
|
];
|
|
};
|
|
};
|
|
}
|