Kodi: Difference between revisions
import from old wiki |
added gbm variant |
||
(One intermediate revision by one other user not shown) | |||
Line 30: | Line 30: | ||
allowedTCPPorts = [ 8080 ]; | allowedTCPPorts = [ 8080 ]; | ||
allowedUDPPorts = [ 8080 ]; | allowedUDPPorts = [ 8080 ]; | ||
}; | |||
} | |||
</syntaxHighlight> | |||
== Autostart kodi-gbm, with HDMI audio passthrough == | |||
From ArchWiki: currently the most feature rich. It is the only one of the three options (x11, wayland, gbm) able to display HDR content, may be a good choice for standalone operations since it runs directly on the GPU without the need for the added X11 layer. A complete list of features lacking compared to other back-ends can be found in Kodi issue 14876. | |||
<syntaxHighlight lang=nix> | |||
{ pkgs, ... }: | |||
{ | |||
# use alsa; which supports hdmi passthrough | |||
services.pulseaudio.enable = false; | |||
services.pipewire.enable = false; | |||
environment.systemPackages = with pkgs; [ | |||
kodi-gbm | |||
]; | |||
users.users = { | |||
kodi = { | |||
initialHashedPassword = "passwordHash"; | |||
extraGroups = [ | |||
# allow kodi access to keyboards | |||
"input" | |||
]; | |||
isNormalUser = true; | |||
}; | |||
}; | |||
# auto-login and launch kodi | |||
services.getty.autologinUser = "kodi"; | |||
services.greetd = { | |||
enable = true; | |||
settings = { | |||
initial_session = { | |||
command = "${pkgs.kodi-gbm}/bin/kodi-standalone"; | |||
user = "kodi"; | |||
}; | |||
default_session = { | |||
command = "${pkgs.greetd.greetd}/bin/agreety --cmd sway"; | |||
}; | |||
}; | |||
}; | |||
programs.sway = { | |||
enable = true; | |||
xwayland.enable = false; | |||
}; | }; | ||
} | } | ||
Line 63: | Line 113: | ||
(pkgs.kodi.withPackages (kodiPkgs: with kodiPkgs; [ | (pkgs.kodi.withPackages (kodiPkgs: with kodiPkgs; [ | ||
jellyfin | jellyfin | ||
])) | |||
]; | |||
</syntaxHighlight> | |||
Or if using as the startup desktop service: | |||
<syntaxHighlight lang=nix> | |||
services.xserver.desktopManager.kodi.package = | |||
pkgs.kodi.withPackages (pkgs: with pkgs; [ | |||
jellycon | |||
])) | ])) | ||
]; | ]; |