2013-02-16 23:19:09 +01:00
|
|
|
{pkgs, config, ...}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs.lib) mkOption mkIf;
|
|
|
|
cfg = config.services.xserver.windowManager.xbmc;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.xserver.windowManager.xbmc = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "Enable the xbmc multimedia center.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.xserver.windowManager = {
|
|
|
|
session = [{
|
|
|
|
name = "xbmc";
|
|
|
|
start = "
|
2013-04-03 23:16:27 +02:00
|
|
|
${pkgs.xbmc}/bin/xbmc --lircdev /var/run/lirc/lircd --standalone &
|
2013-02-16 23:19:09 +01:00
|
|
|
waitPID=$!
|
|
|
|
";
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.xbmc ];
|
|
|
|
};
|
|
|
|
}
|