nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.19k stars 1.85k forks source link

bug: picom 'animations' syntax error #5744

Open heiytor opened 3 months ago

heiytor commented 3 months ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

The latest Picom version accepts an animations configuration, which is declared as a set like ({...}, {...}). I've overridden the Picom package to the latest version, but the following configuration:

  services.picom = {
    enable = true;
    settings = {
      animations = [
        {
            triggers = [ "close" "hide" ];
            preset = "slide-out";
            direction = "down";
        }
      ];
    };
  };

is converted to a file with:

animations = [ { direction = "down"; preset = "slide-out"; triggers = [ "close" , "hide" ]; } ];

This leads to a syntax error:

[ 16/08/2024 18:16:10.876 parse_config_libconfig FATAL ERROR ] Error when reading configuration file "/home/heiytor/.config/picom/picom.conf", line 2: syntax error
[ 16/08/2024 18:16:10.876 main FATAL ERROR ] Failed to create new session.

Maintainer CC

@Philipp-M @thiagokokada

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.6.44, NixOS, 24.05 (Uakari), 24.05.20240804.8b5b672`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/l0992b1shksi7k8w1x6wzi61zbs48vck-source
heiytor commented 3 months ago

IMHO, adding an extraOptions option that simply appends strings to the end of the file would be nice.

dixslyf commented 2 months ago

Just encountered this issue as well.

Picom's configuration format uses libconfig, which differentiates between arrays (enclosed in square brackets []) and lists (enclosed in parentheses ()).

Picom specifies the animations as a list, not as an array. However, the current HM module for Picom can only specify arrays, with no way of specifying lists.

IMHO, adding an extraOptions option that simply appends strings to the end of the file would be nice.

+1 on this.

PassiveLemon commented 1 month ago

Could we get an option to supply a config file? I'd rather supply a config file with --config than write my config into Nix strings