nixfiles/hosts/raspberry-pi5/profiles/kodi.nix

80 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2024-09-04 20:25:07 +01:00
{
pkgs,
inputs,
...
}: let
2024-09-04 21:44:25 +01:00
kodiForkPkg = inputs.nixpkgs-kodi-inputstream-adaptive-fork.legacyPackages.${pkgs.system}.kodi;
kodiForkPkgPatched =
(kodiForkPkg.override {
x11Support = true;
waylandSupport = true;
gbmSupport = true;
})
.overrideAttrs (oldAttrs: {
patches =
oldAttrs.patches
++ [
2024-09-13 15:52:54 +01:00
#./rbp-000-add-pi-support.patch
2024-09-04 21:44:25 +01:00
];
});
kodiPackage = kodiForkPkgPatched.withPackages (kodiPkgs:
with kodiPkgs; [
pvr-iptvsimple
inputstreamhelper
inputstream-adaptive
inputstream-rtmp
visualization-matrix
visualization-spectrum
]);
in {
2024-09-04 21:44:25 +01:00
nixpkgs.overlays = [
2024-09-13 15:50:19 +01:00
(_final: _prev: {
2024-09-04 21:45:53 +01:00
#ffmpeg = final.ffmpeg-pi;
2024-09-04 21:44:25 +01:00
})
];
2024-09-04 21:59:41 +01:00
hardware.graphics.package = pkgs.mesa.overrideAttrs (oA: {
2024-09-13 15:50:19 +01:00
inherit (oA) patches;
2024-09-04 21:58:31 +01:00
});
environment.systemPackages = [
kodiPackage
];
services.xserver = {
enable = true;
2024-09-04 14:39:57 +01:00
desktopManager.kodi = {
enable = true;
package = kodiPackage;
};
extraConfig = ''
Section "OutputClass"
Identifier "vc4"
MatchDriver "vc4"
Driver "modesetting"
Option "PrimaryGPU" "true"
EndSection
'';
};
networking.firewall = {
allowedTCPPorts = [8080];
allowedUDPPorts = [8080];
};
home-manager.users.chaos = let
widevine = pkgs.widevine-aarch64-4k;
in {
home.file.widevine-lib = {
source = "${widevine}/share/google/chrome/WidevineCdm/_platform_specific/linux_arm64/libwidevinecdm.so";
target = ".kodi/cdm/libwidevinecdm.so";
};
home.file.widevine-manifest = {
source = "${widevine}/share/google/chrome/WidevineCdm/manifest.json";
target = ".kodi/cdm/manifest.json";
};
};
}