32 lines
612 B
Nix
32 lines
612 B
Nix
{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 = "
|
|
${pkgs.xbmc}/bin/xbmc-standalone &
|
|
waitPID=$!
|
|
";
|
|
}];
|
|
};
|
|
environment.systemPackages = [ pkgs.xbmc ];
|
|
};
|
|
}
|