2014-04-14 15:26:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2014-03-12 08:20:49 +00:00
|
|
|
|
2014-04-14 15:26:48 +01:00
|
|
|
with lib;
|
2014-03-12 08:20:49 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.xserver.desktopManager.xbmc;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.xserver.desktopManager.xbmc = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "Enable the xbmc multimedia center.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.xserver.desktopManager.session = [{
|
|
|
|
name = "xbmc";
|
|
|
|
start = ''
|
|
|
|
${pkgs.xbmc}/bin/xbmc --lircdev /var/run/lirc/lircd --standalone &
|
|
|
|
waitPID=$!
|
|
|
|
'';
|
|
|
|
}];
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.xbmc ];
|
|
|
|
};
|
|
|
|
}
|