From aacb4e5e99ee3565ff5ecfe7efa3e530be0d304d Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 1 Feb 2026 13:38:47 -0800 Subject: [PATCH] picom: use @include directive for config composition picom doesn't support multiple --config flags. Use a wrapper config with libconfig @include directive to merge the base config and animations config. Co-Authored-By: Claude Opus 4.5 --- nixos/xmonad.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 = {