nixos/picom: add experimentalBackends option

This option is only available as a command-line flag and not from the
config file, that is `services.picom.settings`. Therefore it is more
important that it gets its own option.

One reason one might need this set is that blur methods other than
kernel do not work with the old backends, see yshui/picom#464.

For reference, the home-manager picom module exposes this option too.
This commit is contained in:
Axel Forsman 2020-09-07 20:52:31 +02:00
parent 3c45610ddd
commit b6139e58e3

View file

@ -57,7 +57,15 @@ in {
type = types.bool;
default = false;
description = ''
Whether of not to enable Picom as the X.org composite manager.
Whether or not to enable Picom as the X.org composite manager.
'';
};
experimentalBackends = mkOption {
type = types.bool;
default = false;
description = ''
Whether to use the unstable new reimplementation of the backends.
'';
};
@ -302,7 +310,8 @@ in {
};
serviceConfig = {
ExecStart = "${pkgs.picom}/bin/picom --config ${configFile}";
ExecStart = "${pkgs.picom}/bin/picom --config ${configFile}"
+ (optionalString cfg.experimentalBackends " --experimental-backends");
RestartSec = 3;
Restart = "always";
};