hydra ifd fixes

This commit is contained in:
2026-04-13 23:39:22 -04:00
parent 3442744803
commit c20b77a6b8
3 changed files with 36 additions and 10 deletions

View File

@@ -1,12 +1,24 @@
{ pkgs, lib, ... }:
# Disable stylix in Hydra builds where allow-import-from-derivation is disabled
# This is safe because desktop theming isn't needed for CI/CD builds
{
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
inHydraBuild = builtins.getEnv "HYDRA_ID" != "";
# 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 = !inHydraBuild;
enable = !isRestricted;
image = "${pkgs.hyprland}/share/hypr/wall2.png";
#image = "/home/alice/Pictures/Screenshots/screenshot_2024-12-04-2030.png";