{ pkgs, lib, config, ... }: # Disable stylix in restricted evaluation contexts (like Hydra) # where allow-import-from-derivation is disabled. # Desktop theming isn't needed for CI/CD builds anyway. let # Check if we're in a restricted evaluation context # In restricted eval, builtins.currentTime throws an error isRestricted = let try = builtins.tryEval builtins.currentTime; in !try.success; in { stylix = { enable = !isRestricted; image = "${pkgs.hyprland}/share/hypr/wall2.png"; #image = "/home/alice/Pictures/Screenshots/screenshot_2024-12-04-2030.png"; polarity = "dark"; }; }