mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
picom: remove experimentalBackends, add extraArgs (#3423)
`--experimental-backends` flag was removed in the recent released picom v10. Using it now will result in the program exiting. v10 also introduces its counter-part, `--legacy-backends`. However this will be removed soon. Instead of adding this as an separate option, add `extraArgs` option so for those that they want they can pass it manuall. It is also more future proof.
This commit is contained in:
parent
fe85cc4c37
commit
c94c9c342f
3 changed files with 14 additions and 5 deletions
|
@ -54,6 +54,8 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
(mkRemovedOptionModule [ "services" "picom" "refreshRate" ]
|
(mkRemovedOptionModule [ "services" "picom" "refreshRate" ]
|
||||||
"The option `refresh-rate` has been deprecated by upstream.")
|
"The option `refresh-rate` has been deprecated by upstream.")
|
||||||
|
(mkRemovedOptionModule [ "services" "picom" "experimentalBackends" ]
|
||||||
|
"The option `--experimental-backends` has been removed by upstream.")
|
||||||
(mkRemovedOptionModule [ "services" "picom" "extraOptions" ]
|
(mkRemovedOptionModule [ "services" "picom" "extraOptions" ]
|
||||||
"This option has been replaced by `services.picom.settings`.")
|
"This option has been replaced by `services.picom.settings`.")
|
||||||
(mkRenamedOptionModule [ "services" "picom" "opacityRule" ] [
|
(mkRenamedOptionModule [ "services" "picom" "opacityRule" ] [
|
||||||
|
@ -66,8 +68,6 @@ in {
|
||||||
options.services.picom = {
|
options.services.picom = {
|
||||||
enable = mkEnableOption "Picom X11 compositor";
|
enable = mkEnableOption "Picom X11 compositor";
|
||||||
|
|
||||||
experimentalBackends = mkEnableOption "the new experimental backends";
|
|
||||||
|
|
||||||
fade = mkOption {
|
fade = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -213,6 +213,15 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraArgs = mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [ ];
|
||||||
|
example = literalExpression ''[ "--legacy-backends" ]'';
|
||||||
|
description = ''
|
||||||
|
Extra arguments to be passed to the picom executable.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.picom;
|
default = pkgs.picom;
|
||||||
|
@ -306,7 +315,7 @@ in {
|
||||||
ExecStart = concatStringsSep " " ([
|
ExecStart = concatStringsSep " " ([
|
||||||
"${cfg.package}/bin/picom"
|
"${cfg.package}/bin/picom"
|
||||||
"--config ${config.xdg.configFile."picom/picom.conf".source}"
|
"--config ${config.xdg.configFile."picom/picom.conf".source}"
|
||||||
] ++ optional cfg.experimentalBackends "--experimental-backends");
|
] ++ cfg.extraArgs);
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
WantedBy=graphical-session.target
|
WantedBy=graphical-session.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@picom@/bin/picom --config /nix/store/00000000000000000000000000000000-hm_picompicom.conf --experimental-backends
|
ExecStart=@picom@/bin/picom --config /nix/store/00000000000000000000000000000000-hm_picompicom.conf --legacy-backends
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"unredir-if-possible" = true;
|
"unredir-if-possible" = true;
|
||||||
"dbe" = true;
|
"dbe" = true;
|
||||||
};
|
};
|
||||||
experimentalBackends = true;
|
extraArgs = [ "--legacy-backends" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
test.stubs.picom = { };
|
test.stubs.picom = { };
|
||||||
|
|
Loading…
Reference in a new issue