Merge pull request #117977 from aanderse/nixos/kodi

nixos/kodi: add package option
This commit is contained in:
Pascal Bach 2021-04-02 21:57:03 +02:00 committed by GitHub
commit c259908251
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,16 @@ in
default = false;
description = "Enable the kodi multimedia center.";
};
package = mkOption {
type = types.package;
default = pkgs.kodi;
defaultText = "pkgs.kodi";
example = "pkgs.kodi.withPackages (p: with p; [ jellyfin pvr-iptvsimple vfs-sftp ])";
description = ''
Package that should be used for Kodi.
'';
};
};
};
@ -21,11 +31,11 @@ in
services.xserver.desktopManager.session = [{
name = "kodi";
start = ''
LIRC_SOCKET_PATH=/run/lirc/lircd ${pkgs.kodi}/bin/kodi --standalone &
LIRC_SOCKET_PATH=/run/lirc/lircd ${cfg.package}/bin/kodi --standalone &
waitPID=$!
'';
}];
environment.systemPackages = [ pkgs.kodi ];
environment.systemPackages = [ cfg.package ];
};
}