mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
2955b2fcf4
Now the default way to define NixOS window manager modules is to use mkEnableOption to describe the module itself. In this commit, all files on nixos/modules/services/x11/window-managers are changed.
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.xserver.windowManager.compiz;
|
|
xorg = config.services.xserver.package;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.xserver.windowManager.compiz = {
|
|
|
|
enable = mkEnableOption "compiz";
|
|
|
|
renderingFlag = mkOption {
|
|
default = "";
|
|
example = "--indirect-rendering";
|
|
description = "Pass the <option>--indirect-rendering</option> flag to Compiz.";
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
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 &
|
|
'';
|
|
};
|
|
|
|
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" ];
|
|
|
|
};
|
|
|
|
}
|