2014-04-14 16:26:48 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2010-10-20 01:25:53 +02:00
|
|
|
|
2014-04-14 16:26:48 +02:00
|
|
|
with lib;
|
2009-01-25 16:49:08 +01:00
|
|
|
|
|
|
|
let
|
2010-10-20 01:25:53 +02:00
|
|
|
|
2009-01-25 16:49:08 +01:00
|
|
|
cfg = config.services.xserver.windowManager.compiz;
|
|
|
|
xorg = config.services.xserver.package;
|
|
|
|
|
2010-10-20 01:25:53 +02:00
|
|
|
in
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2010-10-20 01:25:53 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
options = {
|
2009-01-25 16:49:08 +01:00
|
|
|
|
2010-10-20 01:25:53 +02:00
|
|
|
services.xserver.windowManager.compiz = {
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2015-12-04 10:38:23 +01:00
|
|
|
enable = mkEnableOption "compiz";
|
2009-01-25 16:49:08 +01:00
|
|
|
|
|
|
|
renderingFlag = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "--indirect-rendering";
|
2010-10-20 01:25:53 +02:00
|
|
|
description = "Pass the <option>--indirect-rendering</option> flag to Compiz.";
|
2009-01-25 16:49:08 +01:00
|
|
|
};
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2009-01-25 16:49:08 +01:00
|
|
|
};
|
|
|
|
|
2010-10-20 01:25:53 +02:00
|
|
|
};
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2010-10-20 01:25:53 +02:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2010-10-20 01:25:53 +02:00
|
|
|
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 16:49:08 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2010-10-20 01:25:53 +02: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 16:49:08 +01:00
|
|
|
|
|
|
|
};
|
2010-10-20 01:25:53 +02:00
|
|
|
|
2009-01-25 16:49:08 +01:00
|
|
|
}
|