8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
31 lines
609 B
Nix
31 lines
609 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.xserver.desktopManager.kodi;
|
|
in
|
|
|
|
{
|
|
options = {
|
|
services.xserver.desktopManager.kodi = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Enable the kodi multimedia center.";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.xserver.desktopManager.session = [{
|
|
name = "kodi";
|
|
start = ''
|
|
LIRC_SOCKET_PATH=/run/lirc/lircd ${pkgs.kodi}/bin/kodi --standalone &
|
|
waitPID=$!
|
|
'';
|
|
}];
|
|
|
|
environment.systemPackages = [ pkgs.kodi ];
|
|
};
|
|
}
|