Kodi: Difference between revisions

From NixOS Wiki
imported>Mic92
Add kodi page
 
imported>Mic92
No edit summary
Line 6: Line 6:
With this configuration kodi will run automatically on boot:
With this configuration kodi will run automatically on boot:


<syntaxHighlight>
<syntaxHighlight lang=nix>
{
{
   services.xserver.enable = true;
   services.xserver.enable = true;
Line 30: Line 30:
In this example cage, kiosk compositor for Wayland, will run kodi as its only application:
In this example cage, kiosk compositor for Wayland, will run kodi as its only application:


<syntaxHighlight>
<syntaxHighlight lang=nix>
{
{
   # Define a user account
   # Define a user account

Revision as of 07:54, 17 September 2020

Kodi (formerly known as XBMC) is an award-winning free and open source (GPL) software media player and entertainment hub that can be installed on Linux, OSX, Windows, iOS and Android, featuring a 10-foot user interface for use with televisions and remote controls.

Module usage

The NixOS module for kodi sets kodi up as a desktop session. With this configuration kodi will run automatically on boot:

{
  services.xserver.enable = true;
  services.xserver.desktopManager.kodi.enable = true;
  services.xserver.displayManager.autoLogin.enable = true;
  services.xserver.displayManager.autoLogin.user = "kodi";
  users.extraUsers.kodi.isNormalUser = true;

  # Define a user account
  users.extraUsers.kodi.isNormalUser = true;

  # allow everybody in the net to access the wifi
  networking.firewall = {
    allowedTCPPorts = [ 8080 ];
    allowedUDPPorts = [ 8080 ];
  };
}

With wayland

Especially on less-powerful ARM boards the wayland variant is faster. In this example cage, kiosk compositor for Wayland, will run kodi as its only application:

{
  # Define a user account
  users.extraUsers.kodi.isNormalUser = true;
  services.cage.user = "kodi";
  services.cage.program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
  services.cage.enable = true;
}