Build issue on NixOS - undefined variable 'temp' #33

Closed
opened 2026-03-25 17:06:18 +01:00 by AramJonghu · 1 comment
Collaborator

Leaving the error here. The relevant part is on the bottom. Same happens when running nix run . in the git repo directory.

error:
       … while calling the 'head' builtin
         at /nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/lib/attrsets.nix:1696:13:
         1695|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1696|             head values
             |             ^
         1697|           else

       … while evaluating the attribute 'value'
         at /nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/lib/modules.nix:1118:7:
         1117|     // {
         1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1119|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `system.systemBuilderArgs':

       … while evaluating definitions from `/nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/nixos/modules/system/activation/activatable-system.nix':

       … while evaluating the option `system.activationScripts.etc.text':

       … while evaluating definitions from `/nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/nixos/modules/system/etc/etc-activation.nix':

       … while evaluating definitions from `/nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/nixos/modules/system/etc/etc.nix':

       … while evaluating the option `environment.etc.dbus-1.source':

       … while evaluating the option `environment.systemPackages':

       … while evaluating definitions from `/nix/store/5913yij82w836q7j1kdcyn7qnp47h3k7-source/modules/programs':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: undefined variable 'temp'
       at /nix/store/b4s3cjvk5mkl8sbvi3f0m8x745jbrqgz-source/nix/default.nix:125:91:
          124|            substituteInPlace Helpers/Hyprsunset.qml \
          125|                --replace-fail 'Quickshell.execDetached(["hyprctl", "hyprsunset", "temperature", `${temp}`]);' 'Quickshell.execDetached(["hyprsunset", "-t", `${temp}`]);'
             |                                                                                           ^
          126|      substituteInPlace Helpers/Hyprsunset.qml \
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '.#nixosConfigurations."nixos".config.system.build.toplevel' --no-link' returned non-zero exit status 1.
Leaving the error here. The relevant part is on the bottom. Same happens when running `nix run .` in the git repo directory. ``` error: … while calling the 'head' builtin at /nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/lib/attrsets.nix:1696:13: 1695| if length values == 1 || pred here (elemAt values 1) (head values) then 1696| head values | ^ 1697| else … while evaluating the attribute 'value' at /nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/lib/modules.nix:1118:7: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while evaluating the option `system.build.toplevel': … while evaluating definitions from `/nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/nixos/modules/system/activation/top-level.nix': … while evaluating the option `system.systemBuilderArgs': … while evaluating definitions from `/nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/nixos/modules/system/activation/activatable-system.nix': … while evaluating the option `system.activationScripts.etc.text': … while evaluating definitions from `/nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/nixos/modules/system/etc/etc-activation.nix': … while evaluating definitions from `/nix/store/i2mnjncmkjkl0gd7jhvv6vlakvr9p9pm-source/nixos/modules/system/etc/etc.nix': … while evaluating the option `environment.etc.dbus-1.source': … while evaluating the option `environment.systemPackages': … while evaluating definitions from `/nix/store/5913yij82w836q7j1kdcyn7qnp47h3k7-source/modules/programs': (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: undefined variable 'temp' at /nix/store/b4s3cjvk5mkl8sbvi3f0m8x745jbrqgz-source/nix/default.nix:125:91: 124| substituteInPlace Helpers/Hyprsunset.qml \ 125| --replace-fail 'Quickshell.execDetached(["hyprctl", "hyprsunset", "temperature", `${temp}`]);' 'Quickshell.execDetached(["hyprsunset", "-t", `${temp}`]);' | ^ 126| substituteInPlace Helpers/Hyprsunset.qml \ Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '.#nixosConfigurations."nixos".config.system.build.toplevel' --no-link' returned non-zero exit status 1. ```
AramJonghu added the bug label 2026-03-25 17:06:18 +01:00
AramJonghu self-assigned this 2026-03-25 17:06:18 +01:00
zach was assigned by AramJonghu 2026-03-25 17:06:18 +01:00
Author
Collaborator

Resolved.

Resolved.
AramJonghu added this to the Zshell board project 2026-03-25 18:58:33 +01:00
AramJonghu moved this to Done in Zshell board on 2026-03-25 18:58:45 +01:00
Sign in to join this conversation.