Tailscale services can now be declared in Nix, which also eliminates my need for containers completely. Jellyfin hardware encoding can now also be implemented using the Nix module. Hardware support now implemented with nixos-hardware.
40 lines
839 B
Nix
40 lines
839 B
Nix
{ pkgs, ... }:
|
|
{
|
|
services = {
|
|
jellyfin = {
|
|
enable = true; # port = 8096
|
|
|
|
hardwareAcceleration = {
|
|
enable = true;
|
|
type = "qsv";
|
|
device = "/dev/dri/renderD128";
|
|
};
|
|
|
|
# forceEncodingConfig = true;
|
|
|
|
transcoding = {
|
|
enableHardwareEncoding = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
## Grab EPG data daily
|
|
systemd = {
|
|
services = {
|
|
epg = {
|
|
script = "${pkgs.nodejs}/bin/npm run --prefix /media/TV/epg/ grab -- --channels=custom.channels.xml";
|
|
path = [
|
|
pkgs.bash
|
|
pkgs.nodejs
|
|
];
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
User = "root";
|
|
};
|
|
startAt = "daily"; # Creates a timer
|
|
};
|
|
jellyfin.environment.LIBVA_DRIVER_NAME = "iHD";
|
|
};
|
|
timers.epg.timerConfig.Persistent = true;
|
|
};
|
|
}
|