Hi there, I’m trying to add some Kodi plugins that aren’t/shouldn’t be on nixpkgs.
I’ve created the derivations like this:
# pkgs/upnext/default.nix
{ lib, rel, buildKodiAddon, fetchzip, addonUpdateScript }:
buildKodiAddon rec {
pname = "upnext";
namespace = "service.upnext";
version = "1.1.9+matrix.1";
src = fetchzip {
url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip";
sha256 = "";
};
passthru = {
pythonPath = "lib";
updateScript = addonUpdateScript {
attrPath = "kodi.packages.upnext";
};
};
meta = with lib; {
homepage = "https://kodi.wiki/view/Add-on:Up_Next";
description = "Up Next - Proposes to play the next episode automatically";
license = licenses.gpl2Only;
maintainers = teams.kodi.members;
};
}
And they get called here
# pkgs/default.nix
{ pkgs }:
{
upnext = pkgs.callPackage ./upnext {};
# ... and so on
}
That in turn is used as an overlay in my flake:
{
description = "Sanzoghenzo home systems configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
deploy-rs.url = "github:serokell/deploy-rs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = inputs@{
self,
nixpkgs,
home-manager,
deploy-rs,
nixos-hardware,
...
}: let
system = "x86_64-linux";
myPkgsOverlay = final: prev: (import ./pkgs { pkgs = prev; });
pkgs = import nixpkgs {
inherit system pkgs;
config.allowUnfree = true;
overlays = [ myPkgsOverlay ];
};
deployPkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
nixgl.overlay
deploy-rs.overlay
(self: super: {
deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; };
})
];
};
in {
# systems configuration
nixosConfigurations = {
viewscreen = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./systems/viewscreen
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.kodi = import ./home/kodi;
};
}
];
};
};
# devShells and deploy-rs profiles omitted for brevity, they work ok
};
}
Then I tried to use the derivations in my home-manager config:
# home/kodi/default.nix
{ self, config, pkgs, ... }: let
kodiAndPlugins = pkgs.kodi-gbm.withPackages (kodiPkgs: with kodiPkgs; [
jellyfin
# other packages...
pkgs.upnext
]);
in {
programs.kodi = {
enable = true;
package = kodiAndPlugins;
# rest of the configuration...
But I don’t see the addons after applying the flake (via deploy-rs).
I cannot find them in the /nix/store, either.
I might be missing something obvious here, but I can’t figure out what!
Do you see something wrong?
My complete setup can be found here
Thanks in advance for the help!