From c20b77a6b888675c02044a8ce77c448868e78c53 Mon Sep 17 00:00:00 2001 From: ahuston-0 Date: Mon, 13 Apr 2026 23:39:22 -0400 Subject: [PATCH] hydra ifd fixes --- checks.nix | 2 ++ systems/artemision/stylix.nix | 22 +++++++++++++++++----- systems/selinunte/stylix.nix | 22 +++++++++++++++++----- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/checks.nix b/checks.nix index a4e6b87..66ad54a 100644 --- a/checks.nix +++ b/checks.nix @@ -57,6 +57,8 @@ forEachSystem ( all rule 'MD013', :tables => false, :line_length => 220 + exclude_rule 'MD029' # ordered list items separated by blank lines + exclude_rule 'MD041' # YAML frontmatter triggers false positives '').outPath; }; diff --git a/systems/artemision/stylix.nix b/systems/artemision/stylix.nix index 81f291e..eb8ce89 100644 --- a/systems/artemision/stylix.nix +++ b/systems/artemision/stylix.nix @@ -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"; diff --git a/systems/selinunte/stylix.nix b/systems/selinunte/stylix.nix index 81f291e..eb8ce89 100644 --- a/systems/selinunte/stylix.nix +++ b/systems/selinunte/stylix.nix @@ -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";