2010-10-20 00:25:53 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
2009-01-25 15:49:08 +00:00
|
|
|
|
|
|
|
let
|
2010-10-20 00:25:53 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
cfg = config.services.xserver.windowManager.compiz;
|
|
|
|
xorg = config.services.xserver.package;
|
|
|
|
|
2010-10-20 00:25:53 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
options = {
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2010-10-20 00:25:53 +01:00
|
|
|
services.xserver.windowManager.compiz = {
|
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2010-10-20 00:25:53 +01:00
|
|
|
description = "Enable the Compiz window manager.";
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
renderingFlag = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "--indirect-rendering";
|
2010-10-20 00:25:53 +01:00
|
|
|
description = "Pass the <option>--indirect-rendering</option> flag to Compiz.";
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
2010-10-20 00:25:53 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
2010-10-20 00:25:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
services.xserver.windowManager.session = singleton
|
|
|
|
{ name = "compiz";
|
|
|
|
start =
|
|
|
|
''
|
|
|
|
# Start Compiz using the flat-file configuration backend
|
|
|
|
# (ccp).
|
|
|
|
export COMPIZ_PLUGINDIR=${config.system.path}/lib/compiz
|
|
|
|
export COMPIZ_METADATADIR=${config.system.path}/share/compiz
|
|
|
|
${pkgs.compiz}/bin/compiz ccp ${cfg.renderingFlag} &
|
|
|
|
|
|
|
|
# Start GTK-style window decorator.
|
|
|
|
${pkgs.compiz}/bin/gtk-window-decorator &
|
2009-01-25 15:49:08 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2010-10-20 00:25:53 +01:00
|
|
|
environment.systemPackages =
|
|
|
|
[ pkgs.compiz
|
|
|
|
pkgs.compiz_ccsm
|
|
|
|
pkgs.compiz_plugins_main
|
|
|
|
pkgs.compiz_plugins_extra
|
|
|
|
pkgs.libcompizconfig # for the "ccp" plugin
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.pathsToLink = [ "/lib/compiz" "/share/compiz" ];
|
2009-01-25 15:49:08 +00:00
|
|
|
|
|
|
|
};
|
2010-10-20 00:25:53 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
}
|