* Updated the Compiz module: add the plugins, put ccsm in the PATH,
and don't use GConf anymore. svn path=/nixos/trunk/; revision=24374
This commit is contained in:
parent
936e4e73d7
commit
baaf7bd6e3
@ -1,64 +1,63 @@
|
|||||||
{pkgs, config, ...}:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.lib) mkOption mkIf;
|
|
||||||
cfg = config.services.xserver.windowManager.compiz;
|
cfg = config.services.xserver.windowManager.compiz;
|
||||||
xorg = config.services.xserver.package;
|
xorg = config.services.xserver.package;
|
||||||
gnome = pkgs.gnome;
|
|
||||||
|
|
||||||
options = { services = { xserver = { windowManager = {
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
compiz = {
|
options = {
|
||||||
|
|
||||||
|
services.xserver.windowManager.compiz = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
description = "Enable the Compiz window manager.";
|
||||||
description = "Enable the compiz window manager.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
renderingFlag = mkOption {
|
renderingFlag = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
example = "--indirect-rendering";
|
example = "--indirect-rendering";
|
||||||
description = "
|
description = "Pass the <option>--indirect-rendering</option> flag to Compiz.";
|
||||||
Possibly pass --indierct-rendering to Compiz.
|
|
||||||
";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}; }; }; };
|
};
|
||||||
in
|
|
||||||
|
|
||||||
mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
require = options;
|
|
||||||
|
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} &
|
||||||
|
|
||||||
services = {
|
# Start GTK-style window decorator.
|
||||||
xserver = {
|
${pkgs.compiz}/bin/gtk-window-decorator &
|
||||||
|
|
||||||
windowManager = {
|
|
||||||
session = [{
|
|
||||||
name = "compiz";
|
|
||||||
start = ''
|
|
||||||
# !!! Hack: load the schemas for Compiz.
|
|
||||||
GCONF_CONFIG_SOURCE=xml::~/.gconf ${gnome.GConf}/bin/gconftool-2 \
|
|
||||||
--makefile-install-rule ${pkgs.compiz}/etc/gconf/schemas/*.schemas # */
|
|
||||||
|
|
||||||
# !!! Hack: turn on most Compiz modules.
|
|
||||||
${gnome.GConf}/bin/gconftool-2 -t list --list-type=string \
|
|
||||||
--set /apps/compiz/general/allscreens/options/active_plugins \
|
|
||||||
[gconf,png,decoration,wobbly,fade,minimize,move,resize,cube,switcher,rotate,place,scale,water]
|
|
||||||
|
|
||||||
# Start Compiz and the GTK-style window decorator.
|
|
||||||
env LD_LIBRARY_PATH=${xorg.libX11}/lib:${xorg.libXext}/lib:/usr/lib/
|
|
||||||
${pkgs.compiz}/bin/compiz gconf ${cfg.renderingFlag} &
|
|
||||||
${pkgs.compiz}/bin/gtk-window-decorator --sync &
|
|
||||||
'';
|
'';
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
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" ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
|
||||||
x11Packages = [ pkgs.compiz ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user