kodi: service init
This commit is contained in:
parent
41e3dce6b1
commit
f82e8f5cdd
1 changed files with 33 additions and 0 deletions
33
services/kodi.nix
Normal file
33
services/kodi.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
mkIf (elem "kodi" config.machine.services) {
|
||||||
|
users.extraUsers.kodi.isNormalUser = true;
|
||||||
|
services.cage = {
|
||||||
|
enable = true;
|
||||||
|
user = "kodi";
|
||||||
|
program =
|
||||||
|
let
|
||||||
|
kodi = pkgs.kodi-wayland.withPackages (
|
||||||
|
kodiPackages: with kodiPackages; [
|
||||||
|
netflix
|
||||||
|
sponsorblock
|
||||||
|
vfs-libarchive
|
||||||
|
vfs-rar
|
||||||
|
vfs-sftp
|
||||||
|
youtube
|
||||||
|
]
|
||||||
|
);
|
||||||
|
in
|
||||||
|
"${kodi}/bin/kodi-standalone";
|
||||||
|
};
|
||||||
|
# allow remote control
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 8080 ];
|
||||||
|
allowedUDPPorts = [ 8080 ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue