mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
picom: add extraConfig to options
The picom module's `services.picom.settings` converts Nix expressions to the libconfig format. However, that option currently does not have a way to specify libconfig lists (enclosed in parentheses `()`), and can only specify arrays (enclosed in square brackets `[]`). This makes it impossible to specify certain picom configuration options, such as animations (which are specified using lists). This commit adds an `extraConfig` option to the picom module as an escape hatch so that users can still specify picom options that are not currently representable through `services.picom.settings`.
This commit is contained in:
parent
7296022150
commit
0bc5f414f8
1 changed files with 23 additions and 2 deletions
|
|
@ -77,9 +77,12 @@ let
|
|||
${v}
|
||||
'';
|
||||
|
||||
toConf = attrs: concatStringsSep "\n" (mkAttrsString true cfg.settings);
|
||||
toConf = attrs: concatStringsSep "\n" (mkAttrsString true attrs);
|
||||
|
||||
configFile = toConf cfg.settings;
|
||||
configFile = concatStringsSep "\n" [
|
||||
(toConf cfg.settings)
|
||||
cfg.extraConfig
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
|
|
@ -347,6 +350,24 @@ in
|
|||
CONFIGURATION FILES section at `picom(1)`.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
animations = (
|
||||
{
|
||||
triggers = [ "open", "show" ];
|
||||
preset = "slide-in";
|
||||
direction = "up";
|
||||
duration = 0.2;
|
||||
}
|
||||
)
|
||||
'';
|
||||
description = ''
|
||||
Extra configuration lines to append to the picom configuration file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue