diff --git a/nixos/xmonad.nix b/nixos/xmonad.nix index 69bbae8d..594c7ba7 100644 --- a/nixos/xmonad.nix +++ b/nixos/xmonad.nix @@ -140,6 +140,7 @@ makeEnable config "myModules.xmonad" true { # Spring physics animations config - written separately because home-manager # generates [] (arrays) but picom needs () (lists) for animations + # Use @include directive in main config to include this xdg.configFile."picom/animations.conf".text = '' # Spring physics animations (mainline picom with spring-physics branch) # Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping) @@ -205,10 +206,18 @@ makeEnable config "myModules.xmonad" true { ); ''; - # Override picom service to include animations config - # Use %h for home directory since XDG_CONFIG_HOME may not be set + # Wrapper config that includes both home-manager generated config and animations + # This works around picom not supporting multiple --config flags + xdg.configFile."picom/picom-with-animations.conf".text = '' + # Include home-manager generated base config + @include "picom.conf" + # Include spring physics animations (uses () list syntax) + @include "animations.conf" + ''; + + # Override picom service to use our wrapper config systemd.user.services.picom = { - Service.ExecStart = pkgs.lib.mkForce "${pkgs.picom}/bin/picom --config %h/.config/picom/picom.conf --config %h/.config/picom/animations.conf"; + Service.ExecStart = pkgs.lib.mkForce "${pkgs.picom}/bin/picom --config %h/.config/picom/picom-with-animations.conf"; }; # systemd.user.services.notifications-tray-icon = {