1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-26 03:39:47 +01:00
home-manager/modules/services/compton.nix
Ruby Iris Juric 78a0bbb38b
picom: add module
Nixpkgs no longer packages compton, and instead packages picom, a
(mostly) compatible fork of compton, providing an alias from compton
to picom. Because some configuration options have been changed, and
all references to "compton" have been made deprecated and replaced
with "picom", 'services.compton' has been deprecated in favor of the
new 'services.picom'.

Resolves #878
PR #1101
2020-03-24 23:50:22 +01:00

43 lines
1.9 KiB
Nix

{ config, lib, pkgs, ... }:
with lib; {
imports = let
old = n: [ "services" "compton" n ];
new = n: [ "services" "picom" n ];
in [
(mkRenamedOptionModule (old "activeOpacity") (new "activeOpacity"))
(mkRenamedOptionModule (old "backend") (new "backend"))
(mkRenamedOptionModule (old "blur") (new "blur"))
(mkRenamedOptionModule (old "blurExclude") (new "blurExclude"))
(mkRenamedOptionModule (old "extraOptions") (new "extraOptions"))
(mkRenamedOptionModule (old "fade") (new "fade"))
(mkRenamedOptionModule (old "fadeDelta") (new "fadeDelta"))
(mkRenamedOptionModule (old "fadeExclude") (new "fadeExclude"))
(mkRenamedOptionModule (old "fadeSteps") (new "fadeSteps"))
(mkRenamedOptionModule (old "inactiveDim") (new "inactiveDim"))
(mkRenamedOptionModule (old "inactiveOpacity") (new "inactiveOpacity"))
(mkRenamedOptionModule (old "menuOpacity") (new "menuOpacity"))
(mkRenamedOptionModule (old "noDNDShadow") (new "noDNDShadow"))
(mkRenamedOptionModule (old "noDockShadow") (new "noDockShadow"))
(mkRenamedOptionModule (old "opacityRule") (new "opacityRule"))
(mkRenamedOptionModule (old "package") (new "package"))
(mkRenamedOptionModule (old "refreshRate") (new "refreshRate"))
(mkRenamedOptionModule (old "shadow") (new "shadow"))
(mkRenamedOptionModule (old "shadowExclude") (new "shadowExclude"))
(mkRenamedOptionModule (old "shadowOffsets") (new "shadowOffsets"))
(mkRenamedOptionModule (old "shadowOpacity") (new "shadowOpacity"))
(mkChangedOptionModule (old "vSync") (new "vSync") (v: v != "none"))
];
options.services.compton.enable = mkEnableOption "Compton X11 compositor" // {
visible = false;
};
config = mkIf config.services.compton.enable {
warnings = [
"Obsolete option `services.compton.enable' is used. It was renamed to `services.picom.enable'."
];
services.picom.enable = true;
};
}