Kodi: Difference between revisions

Tie-ling (talk | contribs)
added gbm variant
Plan5 (talk | contribs)
Plugins: Add config with plugins for kodi-gbm setup example
 
Line 101: Line 101:
== Plugins ==
== Plugins ==


There are two different ways to install plugins. You can either set the relevant option (search pkgs/top-level/all-packages.nix for "wrapKodi" for a list) through NixOS or home-manager:
There are two different ways to install plugins.  
 
You can either set the relevant option (search pkgs/top-level/all-packages.nix for "wrapKodi" for a list) through NixOS or home-manager:


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 107: Line 109:
</syntaxHighlight>
</syntaxHighlight>


or override Kodi to include the plugins (see pkgs/applications/video/kodi/plugins.nix for a list or search in the kodiPlugins namespace):
Or you can override Kodi to include the plugins (see pkgs/applications/video/kodi/plugins.nix for a list or search in the kodiPlugins namespace):


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 115: Line 117:
]))
]))
];
];
</syntaxHighlight>
When using the setup from the [[Kodi#Autostart kodi-gbm, with HDMI audio passthrough|kodi-gbm section above]], the plugins will not be available unless you use the same definition in the greetd command section. To make this easier, you can define the set as a variable like this and reference it later:
<syntaxHighlight lang=nix>
{ config, pkgs, ... }:
let
    myKodi = (with pkgs; (kodi-gbm.withPackages (p: with p; [
jellycon
])));
in
{
    # Replace occurences of kodi-gbm with myKodi,
    # specifically:
    environment.systemPackages = with pkgs; [
        myKodi
    ];
    # and
    services.greetd.settings.initial_session.command = "${myKodi}/bin/kodi-standalone";
}
</syntaxHighlight>
</syntaxHighlight>