2026-04-13 23:39:22 -04:00
|
|
|
{
|
|
|
|
|
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.
|
2026-04-13 23:19:01 -04:00
|
|
|
let
|
2026-04-13 23:39:22 -04:00
|
|
|
# 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;
|
2026-04-13 23:19:01 -04:00
|
|
|
in
|
2025-03-25 13:49:10 -04:00
|
|
|
{
|
|
|
|
|
stylix = {
|
2026-04-13 23:39:22 -04:00
|
|
|
enable = !isRestricted;
|
2025-03-25 13:49:10 -04:00
|
|
|
image = "${pkgs.hyprland}/share/hypr/wall2.png";
|
|
|
|
|
|
|
|
|
|
#image = "/home/alice/Pictures/Screenshots/screenshot_2024-12-04-2030.png";
|
|
|
|
|
polarity = "dark";
|
|
|
|
|
};
|
|
|
|
|
}
|