Add Kodi desktop-manager

This commit is contained in:
Edward Tjörnhammar 2015-01-19 22:14:36 +01:00
parent 8d1657b463
commit 5b1c9417a8
2 changed files with 32 additions and 1 deletions

View File

@ -19,7 +19,7 @@ in
# E.g., if KDE is enabled, it supersedes xterm.
imports = [
./none.nix ./xterm.nix ./xfce.nix ./kde4.nix
./e19.nix ./gnome3.nix ./xbmc.nix
./e19.nix ./gnome3.nix ./xbmc.nix ./kodi.nix
];
options = {

View File

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.desktopManager.kodi;
in
{
options = {
services.xserver.desktopManager.kodi = {
enable = mkOption {
default = false;
example = true;
description = "Enable the kodi multimedia center.";
};
};
};
config = mkIf cfg.enable {
services.xserver.desktopManager.session = [{
name = "kodi";
start = ''
${pkgs.kodi}/bin/kodi --lircdev /var/run/lirc/lircd --standalone &
waitPID=$!
'';
}];
environment.systemPackages = [ pkgs.kodi ];
};
}