diff --git a/modules/services/picom.nix b/modules/services/picom.nix index 75ed6a72a..f3c47a6c5 100644 --- a/modules/services/picom.nix +++ b/modules/services/picom.nix @@ -54,6 +54,8 @@ in { imports = [ (mkRemovedOptionModule [ "services" "picom" "refreshRate" ] "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" ] "This option has been replaced by `services.picom.settings`.") (mkRenamedOptionModule [ "services" "picom" "opacityRule" ] [ @@ -66,8 +68,6 @@ in { options.services.picom = { enable = mkEnableOption "Picom X11 compositor"; - experimentalBackends = mkEnableOption "the new experimental backends"; - fade = mkOption { type = types.bool; 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 { type = types.package; default = pkgs.picom; @@ -306,7 +315,7 @@ in { ExecStart = concatStringsSep " " ([ "${cfg.package}/bin/picom" "--config ${config.xdg.configFile."picom/picom.conf".source}" - ] ++ optional cfg.experimentalBackends "--experimental-backends"); + ] ++ cfg.extraArgs); Restart = "always"; RestartSec = 3; }; diff --git a/tests/modules/services/picom/picom-basic-configuration-expected.service b/tests/modules/services/picom/picom-basic-configuration-expected.service index 62620502c..6aeef2249 100644 --- a/tests/modules/services/picom/picom-basic-configuration-expected.service +++ b/tests/modules/services/picom/picom-basic-configuration-expected.service @@ -2,7 +2,7 @@ WantedBy=graphical-session.target [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 RestartSec=3 diff --git a/tests/modules/services/picom/picom-basic-configuration.nix b/tests/modules/services/picom/picom-basic-configuration.nix index 67848f52f..1c2689799 100644 --- a/tests/modules/services/picom/picom-basic-configuration.nix +++ b/tests/modules/services/picom/picom-basic-configuration.nix @@ -19,7 +19,7 @@ "unredir-if-possible" = true; "dbe" = true; }; - experimentalBackends = true; + extraArgs = [ "--legacy-backends" ]; }; test.stubs.picom = { };