Infinite Recursion when following Overlay installation instructions #980

Open
opened 2025-08-26 02:54:24 +00:00 by eve-vxs · 10 comments

Describe the bug

When following the updated install instruction for the "advanced config", I added the following to my nix config:

    nixpkgs.overlays = [
      (self: super: {
        inherit
          (self.lixPackageSets.stable)
          nixpkgs-review
          nix-direnv
          nix-eval-jobs
          nix-fast-build
          colmena
          ;
      })
    ];
    nix.package = pkgs.lixPackageSets.stable.lix;
      .....

When attempting to build this configuration, I was presented with:

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

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

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

       error: infinite recursion encountered
       at /nix/store/pxnx7dbr0pz3qpgw2r315wdbb00afdw7-source/pkgs/tools/package-management/lix/default.nix:101:11:
          100|
          101|           nix-direnv = nix-direnv.override {
             |           ^
          102|             nix = self.lix;
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths './nixos#nixosConfigurations."hostname".config.system.build.toplevel' --no-link' returned non-zero exit status 1.

elsewhere in my config I have direnv enabled:

    programs.direnv = {
      enable = true;
      nix-direnv = {
        enable = true;
        package = pkgs.nix-direnv;
      };
    };

Removing this configuration resolved the issue.

I was also able to resolve the issue by removing the lix overlay for nix-direnv and adjusting my direnv config like so:

    programs.direnv = {
      enable = true;
      nix-direnv = {
        enable = true;
        package = pkgs.lixPackageSets.stable.nix-direnv;
      };
    };

However I am not sure if this is ideal.

Steps To Reproduce

  1. Copy and paste excerpt from the advanced config install doco
  2. have programs.direnv.enable = true;

Expected behavior

I would expect the overlay to be compatible with my existing configuration and to function without modification.

nix --version output

nix (Lix, like Nix) 2.91.3

Additional context

Add any other context about the problem here.

## Describe the bug When following the updated install instruction for the "advanced config", I added the following to my nix config: ```nix nixpkgs.overlays = [ (self: super: { inherit (self.lixPackageSets.stable) nixpkgs-review nix-direnv nix-eval-jobs nix-fast-build colmena ; }) ]; nix.package = pkgs.lixPackageSets.stable.lix; ..... ``` When attempting to build this configuration, I was presented with: ``` error: … while calling the 'head' builtin at /nix/store/pxnx7dbr0pz3qpgw2r315wdbb00afdw7-source/lib/attrsets.nix:1544:13: 1543| if length values == 1 || pred here (elemAt values 1) (head values) then 1544| head values | ^ 1545| else … while evaluating the attribute 'value' at /nix/store/pxnx7dbr0pz3qpgw2r315wdbb00afdw7-source/lib/modules.nix:1118:7: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; (stack trace truncated; use '--show-trace' to show the full trace) error: infinite recursion encountered at /nix/store/pxnx7dbr0pz3qpgw2r315wdbb00afdw7-source/pkgs/tools/package-management/lix/default.nix:101:11: 100| 101| nix-direnv = nix-direnv.override { | ^ 102| nix = self.lix; Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths './nixos#nixosConfigurations."hostname".config.system.build.toplevel' --no-link' returned non-zero exit status 1. ``` elsewhere in my config I have direnv enabled: ```nix programs.direnv = { enable = true; nix-direnv = { enable = true; package = pkgs.nix-direnv; }; }; ``` Removing this configuration resolved the issue. I was also able to resolve the issue by removing the lix overlay for nix-direnv and adjusting my direnv config like so: ```nix programs.direnv = { enable = true; nix-direnv = { enable = true; package = pkgs.lixPackageSets.stable.nix-direnv; }; }; ``` However I am not sure if this is ideal. ## Steps To Reproduce 1. Copy and paste excerpt from the advanced config install doco 2. have programs.direnv.enable = true; ## Expected behavior I would expect the overlay to be compatible with my existing configuration and to function without modification. ## `nix --version` output nix (Lix, like Nix) 2.91.3 ## Additional context Add any other context about the problem here.
Owner

Does the issue persist if you remove only the package = pkgs.nix-direnv; line in your configuration?

Does the issue persist if you remove only the `package = pkgs.nix-direnv;` line in your configuration?
Author

@qyriad wrote in #980 (comment):

Does the issue persist if you remove only the package = pkgs.nix-direnv; line in your configuration?

Yes, It occurs even if the only direnv config is enable = true. I tried it with that line removed. Then I tried it with the entire nix-direnv section removed and it still had the issue.

@qyriad wrote in https://git.lix.systems/lix-project/lix/issues/980#issuecomment-14586: > Does the issue persist if you remove only the `package = pkgs.nix-direnv;` line in your configuration? Yes, It occurs even if the only direnv config is enable = true. I tried it with that line removed. Then I tried it with the entire nix-direnv section removed and it still had the issue.
Owner

Oh, it is a documentation error — it should be inherit (prev.lixPackageSets.stable) ….

I'll fix the docs, but that should fix your issue @eve-vxs

Oh, it is a documentation error — it should be `inherit (prev.lixPackageSets.stable) …`. I'll fix the docs, but that *should* fix your issue @eve-vxs

Hello! I can reproduce this issue. It happens in both my own system and a very minimal flake configuration. Changing it to prev.lixPackageSets.stable does not solve the issue.

Very minimal reproducer flake, built with nixos-rebuild build --flake .#example
{
  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";

  outputs =
    { self, nixpkgs }:
    {
      nixosConfigurations.example = nixpkgs.lib.nixosSystem {
        modules = [
          (
            { pkgs, ... }:
            {
              boot.loader.systemd-boot.enable = true;
              fileSystems."/" = {
                device = "/dev/sda1";
                fsType = "ext4";
              };
              networking.hostName = "example";
              nixpkgs.hostPlatform = "x86_64-linux";
              system.stateVersion = "25.05";
              nix.package = pkgs.lixPackageSets.latest.lix;
              nixpkgs.overlays = [
                (final: prev: {
                  inherit (prev.lixPackageSets.latest)
                    colmena
                    nix-direnv
                    nix-eval-jobs
                    nix-fast-build
                    nixpkgs-review
                    ;
                })
              ];
              environment.systemPackages = [
                pkgs.colmena
                pkgs.nix-direnv
                pkgs.nix-eval-jobs
                pkgs.nix-fast-build
                pkgs.nixpkgs-review
              ];
            }
          )
        ];
      };
    };
}

Interestingly, in the reproducer, commenting out all but one of the items in environment.SystemPackages fails for colmena, nix-direnv, nix-fast-build, and nixpkgs-review, but the build succeeds if only nix-eval-jobs is included. I'm not familiar enough with the internals to understand why.

Hello! I can reproduce this issue. It happens in both my own system and a very minimal flake configuration. Changing it to `prev.lixPackageSets.stable` does not solve the issue. <details> <summary>Very minimal reproducer flake, built with <code>nixos-rebuild build --flake .#example</code></summary> ```nix { inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; outputs = { self, nixpkgs }: { nixosConfigurations.example = nixpkgs.lib.nixosSystem { modules = [ ( { pkgs, ... }: { boot.loader.systemd-boot.enable = true; fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; networking.hostName = "example"; nixpkgs.hostPlatform = "x86_64-linux"; system.stateVersion = "25.05"; nix.package = pkgs.lixPackageSets.latest.lix; nixpkgs.overlays = [ (final: prev: { inherit (prev.lixPackageSets.latest) colmena nix-direnv nix-eval-jobs nix-fast-build nixpkgs-review ; }) ]; environment.systemPackages = [ pkgs.colmena pkgs.nix-direnv pkgs.nix-eval-jobs pkgs.nix-fast-build pkgs.nixpkgs-review ]; } ) ]; }; }; } ``` </details> Interestingly, in the reproducer, commenting out all but one of the items in `environment.SystemPackages` fails for `colmena`, `nix-direnv`, `nix-fast-build`, and `nixpkgs-review`, but the build succeeds if only `nix-eval-jobs` is included. I'm not familiar enough with the internals to understand why.

I'm having the same issue, even after correcting my overlay as above. Everything builds fine if I overlay all the packages except nix-direnv (so nixpkgs-review, nix-eval-jobs, nix-fast-build and colmena are overlaid with those from prev.lixPackageSets.stable), but as soon as I add nix-direnv I get the same infinite recursion error.

For reference, my current direnv config is as follows:

programs.direnv = {
  enable = true;
  enableZshIntegration = true;
  nix-direnv.enable = true;
};
I'm having the same issue, even after correcting my overlay as above. Everything builds fine if I overlay all the packages _except_ `nix-direnv` (so `nixpkgs-review`, `nix-eval-jobs`, `nix-fast-build` and `colmena` are overlaid with those from `prev.lixPackageSets.stable`), but as soon as I add `nix-direnv` I get the same infinite recursion error. For reference, my current direnv config is as follows: ```nix programs.direnv = { enable = true; enableZshIntegration = true; nix-direnv.enable = true; }; ```
Owner

Perhaps, we are actually debugging another problem pertaining to nix-direnv only?

Perhaps, we are actually debugging another problem pertaining to nix-direnv only?

Possibly? I think the recursion is coming from nix-direnv already being overridden here, so when the lix overlay also overrides the same package (through pkgs.lixPackageSets.stable.nix-direnv) it gets caught up trying to apply the overrides on top of each other?

I'm not sure how this would be solved on either end, is it a case of giving the overrides a priority and applying them in sequence somehow? I haven't been able to find any similar instances online.

Full trace when trying to overlay `nix-direnv`
error:
       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1539:14:
         1538|         zipAttrsWith (
         1539|           n: values:
             |              ^
         1540|           let

       … while calling the 'head' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1544:13:
         1543|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1544|             head values
             |             ^
         1545|           else

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17:
         1191|         mapAttrs (
         1192|           name: value:
             |                 ^
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85:
         1192|           name: value:
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1194|         );

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71:
          274|           # For definitions that have an associated option
          275|           declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
             |                                                                       ^
          276|

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

       … while calling the 'addErrorContext' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:15:
         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 the attribute 'mergedValue'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1165:5:
         1164|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
         1165|     mergedValue =
             |     ^
         1166|       if isDefined then

       … while evaluating isDefined
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1166:10:
         1165|     mergedValue =
         1166|       if isDefined then
             |          ^
         1167|         if all (def: type.check def.value) defsFinal then

       … while evaluating defsFinal
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1180:17:
         1179|
         1180|     isDefined = defsFinal != [ ];
             |                 ^
         1181|

       … while evaluating the attribute 'values'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1159:9:
         1158|       {
         1159|         values = defs''';
             |         ^
         1160|         inherit (defs'') highestPrio;

       … while calling the 'any' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1153:14:
         1152|           # Avoid sorting if we don't have to.
         1153|           if any (def: def.value._type or "" == "order") defs''.values then
             |              ^
         1154|             sortProperties defs''.values

       … while evaluating the attribute 'values'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1286:7:
         1285|     {
         1286|       values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
             |       ^
         1287|       inherit highestPrio;

       … while calling the 'concatMap' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1286:16:
         1285|     {
         1286|       values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
             |                ^
         1287|       inherit highestPrio;

       … while calling the 'concatMap' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1133:17:
         1132|         # Process mkMerge and mkIf properties.
         1133|         defs' = concatMap (
             |                 ^
         1134|           m:

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1134:11:
         1133|         defs' = concatMap (
         1134|           m:
             |           ^
         1135|           map (

       … while calling the 'map' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1135:11:
         1134|           m:
         1135|           map (
             |           ^
         1136|             value:

       … while calling the 'addErrorContext' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:14:
         1143|               }
         1144|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |              ^
         1145|         ) defs;

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

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80:
         1143|               }
         1144|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1145|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5:
         1236|   dischargeProperties =
         1237|     def:
             |     ^
         1238|     if def._type or "" == "merge" then

       … while evaluating an expression to select '_type' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating def
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating the attribute 'value'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:805:21:
          804|             inherit (module) file;
          805|             inherit value;
             |                     ^
          806|           }) module.config

       … while evaluating system
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:400:79:
          399|     system.build.toplevel =
          400|       if config.system.includeBuildDependencies then systemWithBuildDeps else system;
             |                                                                               ^
          401|

       … while evaluating baseSystemAssertWarn
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:89:7:
           88|       # Avoid IFD if possible, by sidestepping replaceDependencies if no replacements are specified.
           89|       baseSystemAssertWarn
             |       ^
           90|     else

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:80:26:
           79|   # Handle assertions and warnings
           80|   baseSystemAssertWarn = lib.asserts.checkAssertWarn config.assertions config.warnings baseSystem;
             |                          ^
           81|

       … while calling 'checkAssertWarn'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/asserts.nix:193:27:
          192|   checkAssertWarn =
          193|     assertions: warnings: val:
             |                           ^
          194|     let

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/asserts.nix:200:7:
          199|     else
          200|       showWarnings warnings val;
             |       ^
          201|

       … while calling 'showWarnings'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:962:28:
          961|
          962|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                            ^
          963|

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:962:33:
          961|
          962|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                 ^
          963|

       … while calling 'foldr'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/lists.nix:139:14:
          138|   foldr =
          139|     op: nul: list:
             |              ^
          140|     let

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/lists.nix:144:5:
          143|     in
          144|     fold' 0;
             |     ^
          145|

       … while calling 'fold''
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/lists.nix:142:15:
          141|       len = length list;
          142|       fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));
             |               ^
          143|     in

       … while evaluating nul
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/lists.nix:142:35:
          141|       len = length list;
          142|       fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));
             |                                   ^
          143|     in

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:62:16:
           61|   # makes it bootable. See `activatable-system.nix`.
           62|   baseSystem = pkgs.stdenvNoCC.mkDerivation (
             |                ^
           63|     {

       … while calling 'mkDerivation'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:66:18:
           65|   */
           66|   mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);
             |                  ^
           67|

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:66:29:
           65|   */
           66|   mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);
             |                             ^
           67|

       … while calling 'makeDerivationExtensible'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:77:5:
           76|   makeDerivationExtensible =
           77|     rattrs:
             |     ^
           78|     let

       … while evaluating finalPackage
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:137:5:
          136|     in
          137|     finalPackage;
             |     ^
          138|

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:134:22:
          133|
          134|       finalPackage = mkDerivationSimple overrideAttrs args;
             |                      ^
          135|

       … while evaluating rattrs
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:84:14:
           83|       # An infinite recursion here can be caused by having the attribute names of expression `e` in `.overrideAttrs(finalAttrs: previousAttrs: e)` depend on `finalAttrs`. Only the attribute values of `e` can depend on `finalAttrs`.
           84|       args = rattrs (args // { inherit finalPackage overrideAttrs; });
             |              ^
           85|       #              ^^^^

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:66:55:
           65|   */
           66|   mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);
             |                                                       ^
           67|

       … while calling 'toFunction'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:1100:16:
         1099|   */
         1100|   toFunction = v: if isFunction v then v else k: v;
             |                ^
         1101|

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:1100:22:
         1099|   */
         1100|   toFunction = v: if isFunction v then v else k: v;
             |                      ^
         1101|

       … while calling 'isFunction'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:1023:16:
         1022|   */
         1023|   isFunction = f: builtins.isFunction f || (f ? __functor && isFunction (f.__functor f));
             |                ^
         1024|

       … while calling the 'isFunction' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:1023:19:
         1022|   */
         1023|   isFunction = f: builtins.isFunction f || (f ? __functor && isFunction (f.__functor f));
             |                   ^
         1024|

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:76:22:
           75|     }
           76|     // config.system.systemBuilderArgs
             |                      ^
           77|   );

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17:
         1191|         mapAttrs (
         1192|           name: value:
             |                 ^
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85:
         1192|           name: value:
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1194|         );

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71:
          274|           # For definitions that have an associated option
          275|           declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
             |                                                                       ^
          276|

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

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

       … while evaluating the option `system.systemBuilderArgs':

       … while evaluating the attribute 'mergedValue'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1165:5:
         1164|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
         1165|     mergedValue =
             |     ^
         1166|       if isDefined then

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1168:11:
         1167|         if all (def: type.check def.value) defsFinal then
         1168|           type.merge loc defsFinal
             |           ^
         1169|         else

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:831:22:
          830|                 # Non-lazy merge Function
          831|                 loc: defs:
             |                      ^
          832|                 mapAttrs (n: v: v.value) (

       … while calling the 'mapAttrs' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:832:17:
          831|                 loc: defs:
          832|                 mapAttrs (n: v: v.value) (
             |                 ^
          833|                   filterAttrs (n: v: v ? value) (

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:833:19:
          832|                 mapAttrs (n: v: v.value) (
          833|                   filterAttrs (n: v: v ? value) (
             |                   ^
          834|                     zipAttrsWith (name: defs: (mergeDefinitions (loc ++ [ name ]) elemType (defs)).optionalValue)

       … while calling 'filterAttrs'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:23:
          666|   */
          667|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                       ^
          668|

       … while calling the 'removeAttrs' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:28:
          666|   */
          667|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                            ^
          668|

       … while calling the 'filter' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:45:
          666|   */
          667|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                             ^
          668|

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:53:
          666|   */
          667|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                                     ^
          668|

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:60:
          666|   */
          667|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                                            ^
          668|

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:833:35:
          832|                 mapAttrs (n: v: v.value) (
          833|                   filterAttrs (n: v: v ? value) (
             |                                   ^
          834|                     zipAttrsWith (name: defs: (mergeDefinitions (loc ++ [ name ]) elemType (defs)).optionalValue)

       … while evaluating v
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:833:38:
          832|                 mapAttrs (n: v: v.value) (
          833|                   filterAttrs (n: v: v ? value) (
             |                                      ^
          834|                     zipAttrsWith (name: defs: (mergeDefinitions (loc ++ [ name ]) elemType (defs)).optionalValue)

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:74:
          666|   */
          667|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                                                          ^
          668|

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:834:41:
          833|                   filterAttrs (n: v: v ? value) (
          834|                     zipAttrsWith (name: defs: (mergeDefinitions (loc ++ [ name ]) elemType (defs)).optionalValue)
             |                                         ^
          835|                       # Push down position info.

       … while evaluating the attribute 'optionalValue'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1182:5:
         1181|
         1182|     optionalValue = if isDefined then { value = mergedValue; } else { };
             |     ^
         1183|   };

       … while evaluating isDefined
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1182:24:
         1181|
         1182|     optionalValue = if isDefined then { value = mergedValue; } else { };
             |                        ^
         1183|   };

       (9 duplicate frames omitted)

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

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80:
         1143|               }
         1144|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1145|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5:
         1236|   dischargeProperties =
         1237|     def:
             |     ^
         1238|     if def._type or "" == "merge" then

       … while evaluating an expression to select '_type' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating def
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating the attribute 'value'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:774:15:
          773|               inherit (def) file;
          774|               value = v;
             |               ^
          775|             }) def.value

       … while evaluating the attribute 'system.activationScripts.script'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:172:11:
          171|         // {
          172|           script = systemActivationScript set false;
             |           ^
          173|         };

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:172:20:
          171|         // {
          172|           script = systemActivationScript set false;
             |                    ^
          173|         };

       … while calling 'systemActivationScript'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:30:10:
           29|   systemActivationScript =
           30|     set: onlyDry:
             |          ^
           31|     let

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:71:9:
           70|
           71|       ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
             |         ^
           72|

       … while calling 'textClosureMap'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings-with-deps.nix:168:20:
          167|   textClosureMap =
          168|     f: predefined: names:
             |                    ^
          169|     concatStringsSep "\n" (map f (textClosureList predefined names));

       … while calling the 'concatStringsSep' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings-with-deps.nix:169:5:
          168|     f: predefined: names:
          169|     concatStringsSep "\n" (map f (textClosureList predefined names));
             |     ^
          170|

       … while calling 'id'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:40:8:
           39|   */
           40|   id = x: x;
             |        ^
           41|

       … while evaluating x
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:40:11:
           39|   */
           40|   id = x: x;
             |           ^
           41|

       … while evaluating the attribute 'text'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:17:7:
           16|     // {
           17|       text = ''
             |       ^
           18|         #### Activation script snippet ${a}:

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:20:13:
           19|         _localstatus=0
           20|         ${v.text}
             |             ^
           21|

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17:
         1191|         mapAttrs (
         1192|           name: value:
             |                 ^
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85:
         1192|           name: value:
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1194|         );

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71:
          274|           # For definitions that have an associated option
          275|           declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
             |                                                                       ^
          276|

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

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

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

       (11 duplicate frames omitted)

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

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80:
         1143|               }
         1144|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1145|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5:
         1236|   dischargeProperties =
         1237|     def:
             |     ^
         1238|     if def._type or "" == "merge" then

       … while evaluating an expression to select '_type' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating def
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating the attribute 'value'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:805:21:
          804|             inherit (module) file;
          805|             inherit value;
             |                     ^
          806|           }) module.config

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc-activation.nix:19:29:
           18|         "specialfs"
           19|       ] config.system.build.etcActivationCommands;
             |                             ^
           20|     }

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1539:14:
         1538|         zipAttrsWith (
         1539|           n: values:
             |              ^
         1540|           let

       … while calling the 'head' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1544:13:
         1543|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1544|             head values
             |             ^
         1545|           else

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:818:27:
          817|                   (
          818|                     name: defs:
             |                           ^
          819|                     let

       … while evaluating the attribute 'optionalValue.value'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1182:5:
         1181|
         1182|     optionalValue = if isDefined then { value = mergedValue; } else { };
             |     ^
         1183|   };

       … while evaluating an expression to select 'value' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:823:42:
          822|                     in
          823|                     merged.optionalValue.value or elemType.emptyValue.value or merged.mergedValue
             |                                          ^
          824|                   )

       (10 duplicate frames omitted)

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

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80:
         1143|               }
         1144|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1145|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5:
         1236|   dischargeProperties =
         1237|     def:
             |     ^
         1238|     if def._type or "" == "merge" then

       … while evaluating an expression to select '_type' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating def
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating the attribute 'value'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:774:15:
          773|               inherit (def) file;
          774|               value = v;
             |               ^
          775|             }) def.value

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:293:73:
          292|       len = length attrPath;
          293|       atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); };
             |                                                                         ^
          294|     in

       … while calling 'atDepth'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:293:17:
          292|       len = length attrPath;
          293|       atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); };
             |                 ^
          294|     in

       … while evaluating value
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:293:37:
          292|       len = length attrPath;
          293|       atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); };
             |                                     ^
          294|     in

       … while evaluating the attribute 'value'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:805:21:
          804|             inherit (module) file;
          805|             inherit value;
             |                     ^
          806|           }) module.config

       … while calling the 'getAttr' builtin
         at «internal»:1:500:
       … while calling the 'derivationStrict' builtin
         at «internal»:1:208:
       … while evaluating derivation 'etc'
         whose name attribute is located at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:480:13

       … while evaluating attribute 'buildCommand' of derivation 'etc'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/build-support/trivial-builders/default.nix:80:17:
           79|         enableParallelBuilding = true;
           80|         inherit buildCommand name;
             |                 ^
           81|         passAsFile = [ "buildCommand" ] ++ (derivationArgs.passAsFile or [ ]);

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:56:11:
           55|         mkdir -p "$out/etc"
           56|         ${lib.concatMapStringsSep "\n" (
             |           ^
           57|           etcEntry:

       … while calling 'concatMapStringsSep'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:231:13:
          230|   concatMapStringsSep =
          231|     sep: f: list:
             |             ^
          232|     concatStringsSep sep (map f list);

       … while calling the 'concatStringsSep' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:232:5:
          231|     sep: f: list:
          232|     concatStringsSep sep (map f list);
             |     ^
          233|

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:57:11:
           56|         ${lib.concatMapStringsSep "\n" (
           57|           etcEntry:
             |           ^
           58|           lib.escapeShellArgs [

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:58:11:
           57|           etcEntry:
           58|           lib.escapeShellArgs [
             |           ^
           59|             "makeEtcEntry"

       … while calling 'concatMapStringsSep'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:231:13:
          230|   concatMapStringsSep =
          231|     sep: f: list:
             |             ^
          232|     concatStringsSep sep (map f list);

       … while calling the 'concatStringsSep' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:232:5:
          231|     sep: f: list:
          232|     concatStringsSep sep (map f list);
             |     ^
          233|

       … while calling 'escapeShellArg'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:1171:5:
         1170|   escapeShellArg =
         1171|     arg:
             |     ^
         1172|     let

       … while calling the 'match' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:1175:8:
         1174|     in
         1175|     if match "[[:alnum:],._+:@%/-]+" string == null then
             |        ^
         1176|       "'${replaceString "'" "'\\''" string}'"

       … while evaluating the second argument passed to builtins.match

       … while calling the 'toString' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:1173:16:
         1172|     let
         1173|       string = toString arg;
             |                ^
         1174|     in

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:61:25:
           60|             # Force local source paths to be added to the store
           61|             "${etcEntry.source}"
             |                         ^
           62|             etcEntry.target

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17:
         1191|         mapAttrs (
         1192|           name: value:
             |                 ^
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85:
         1192|           name: value:
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1194|         );

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71:
          274|           # For definitions that have an associated option
          275|           declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
             |                                                                       ^
          276|

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

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

       … while evaluating the option `environment.etc."direnv/direnvrc".source':

       (14 duplicate frames omitted)

       … while calling the 'isBool' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1241:10:
         1240|     else if def._type or "" == "if" then
         1241|       if isBool def.condition then
             |          ^
         1242|         if def.condition then dischargeProperties def.content else [ ]

       … while evaluating the attribute 'condition'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1397:13:
         1396|     _type = "if";
         1397|     inherit condition content;
             |             ^
         1398|   };

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:225:43:
          224|                 target = lib.mkDefault name;
          225|                 source = lib.mkIf (config.text != null) (
             |                                           ^
          226|                   let

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17:
         1191|         mapAttrs (
         1192|           name: value:
             |                 ^
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85:
         1192|           name: value:
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1194|         );

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71:
          274|           # For definitions that have an associated option
          275|           declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
             |                                                                       ^
          276|

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

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

       … while evaluating the option `environment.etc."direnv/direnvrc".text':

       (11 duplicate frames omitted)

       … while evaluating definitions from `/nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix':

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80:
         1143|               }
         1144|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1145|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5:
         1236|   dischargeProperties =
         1237|     def:
             |     ^
         1238|     if def._type or "" == "merge" then

       … while evaluating an expression to select '_type' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating def
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8:
         1237|     def:
         1238|     if def._type or "" == "merge" then
             |        ^
         1239|       concatMap dischargeProperties def.contents

       … while evaluating the attribute 'value'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:805:21:
          804|             inherit (module) file;
          805|             inherit value;
             |                     ^
          806|           }) module.config

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix:166:13:
          165|         "direnv/direnvrc".text = ''
          166|           ${lib.optionalString cfg.nix-direnv.enable ''
             |             ^
          167|             #Load nix-direnv

       … while calling 'optionalString'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:736:26:
          735|   */
          736|   optionalString = cond: string: if cond then string else "";
             |                          ^
          737|

       … while evaluating string
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:736:47:
          735|   */
          736|   optionalString = cond: string: if cond then string else "";
             |                                               ^
          737|

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix:168:37:
          167|             #Load nix-direnv
          168|             source ${cfg.nix-direnv.package}/share/nix-direnv/direnvrc
             |                                     ^
          169|           ''}

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17:
         1191|         mapAttrs (
         1192|           name: value:
             |                 ^
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85:
         1192|           name: value:
         1193|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1194|         );

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71:
          274|           # For definitions that have an associated option
          275|           declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
             |                                                                       ^
          276|

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

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

       … while evaluating the option `programs.direnv.nix-direnv.package':

       … while evaluating the attribute 'mergedValue'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1165:5:
         1164|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
         1165|     mergedValue =
             |     ^
         1166|       if isDefined then

       … while evaluating isDefined
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1166:10:
         1165|     mergedValue =
         1166|       if isDefined then
             |          ^
         1167|         if all (def: type.check def.value) defsFinal then

       … while evaluating defsFinal
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1180:17:
         1179|
         1180|     isDefined = defsFinal != [ ];
             |                 ^
         1181|

       … while evaluating the attribute 'values'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1159:9:
         1158|       {
         1159|         values = defs''';
             |         ^
         1160|         inherit (defs'') highestPrio;

       … while calling the 'any' builtin
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1153:14:
         1152|           # Avoid sorting if we don't have to.
         1153|           if any (def: def.value._type or "" == "order") defs''.values then
             |              ^
         1154|             sortProperties defs''.values

       … while calling anonymous lambda
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1153:19:
         1152|           # Avoid sorting if we don't have to.
         1153|           if any (def: def.value._type or "" == "order") defs''.values then
             |                   ^
         1154|             sortProperties defs''.values

       … while evaluating the attribute 'value._type'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1283:67:
         1282|       strip =
         1283|         def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def;
             |                                                                   ^
         1284|     in

       … while evaluating an expression to select '_type' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1153:34:
         1152|           # Avoid sorting if we don't have to.
         1153|           if any (def: def.value._type or "" == "order") defs''.values then
             |                                  ^
         1154|             sortProperties defs''.values

       … while evaluating the attribute 'value.content'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1416:22:
         1415|     _type = "override";
         1416|     inherit priority content;
             |                      ^
         1417|   };

       … while evaluating the attribute 'default'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix:74:9:
           73|       package = lib.mkOption {
           74|         default = pkgs.nix-direnv.override { nix = config.nix.package; };
             |         ^
           75|         defaultText = "pkgs.nix-direnv";

       … while evaluating the attribute 'nix-direnv.override'
         at /nix/store/2rgi6ky1nb03l6di8sqszb1kyv5kfy35-s23x13jdh2faxm3xfmnahr42sjnp3xcr-source/modules/nixos/nix/default.nix:57:9:
           56|         # Below is broken as of 26/9/2025, see https://git.lix.systems/lix-project/lix/issues/980
           57|         nix-direnv
             |         ^
           58|         nix-eval-jobs

       … while evaluating an expression to select 'override' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix:74:35:
           73|       package = lib.mkOption {
           74|         default = pkgs.nix-direnv.override { nix = config.nix.package; };
             |                                   ^
           75|         defaultText = "pkgs.nix-direnv";

       … while evaluating the attribute 'nix-direnv'
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/tools/package-management/lix/default.nix:103:11:
          102|
          103|           nix-direnv = nix-direnv.override {
             |           ^
          104|             nix = self.lix;

       … while evaluating an expression to select 'override' on it
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/tools/package-management/lix/default.nix:103:24:
          102|
          103|           nix-direnv = nix-direnv.override {
             |                        ^
          104|             nix = self.lix;

       … while evaluating nix-direnv
         at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/tools/package-management/lix/default.nix:103:24:
          102|
          103|           nix-direnv = nix-direnv.override {
             |                        ^
          104|             nix = self.lix;

       error: infinite recursion encountered
       at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/tools/package-management/lix/default.nix:103:24:
          102|
          103|           nix-direnv = nix-direnv.override {
             |                        ^
          104|             nix = self.lix;
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/home/joe/.nixos-config#nixosConfigurations."timber-hearth".config.system.build.toplevel' --show-trace --no-link' returned non-zero exit status 1.

Possibly? I think the recursion is coming from `nix-direnv` already being overridden [here](https://github.com/NixOS/nixpkgs/blob/5a1cf2923635c75744eb9f1844eb91b1dd2931cc/nixos/modules/programs/direnv.nix#L74), so when the lix overlay also overrides the same package (through `pkgs.lixPackageSets.stable.nix-direnv`) it gets caught up trying to apply the overrides on top of each other? I'm not sure how this would be solved on either end, is it a case of giving the overrides a priority and applying them in sequence somehow? I haven't been able to find any similar instances online. <details> <summary>Full trace when trying to overlay `nix-direnv`</summary> ``` error: … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1539:14: 1538| zipAttrsWith ( 1539| n: values: | ^ 1540| let … while calling the 'head' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1544:13: 1543| if length values == 1 || pred here (elemAt values 1) (head values) then 1544| head values | ^ 1545| else … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17: 1191| mapAttrs ( 1192| name: value: | ^ 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85: 1192| name: value: 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value | ^ 1194| ); … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71: 274| # For definitions that have an associated option 275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options; | ^ 276| … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:7: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while calling the 'addErrorContext' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:15: 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 the attribute 'mergedValue' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1165:5: 1164| # Type-check the remaining definitions, and merge them. Or throw if no definitions. 1165| mergedValue = | ^ 1166| if isDefined then … while evaluating isDefined at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1166:10: 1165| mergedValue = 1166| if isDefined then | ^ 1167| if all (def: type.check def.value) defsFinal then … while evaluating defsFinal at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1180:17: 1179| 1180| isDefined = defsFinal != [ ]; | ^ 1181| … while evaluating the attribute 'values' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1159:9: 1158| { 1159| values = defs'''; | ^ 1160| inherit (defs'') highestPrio; … while calling the 'any' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1153:14: 1152| # Avoid sorting if we don't have to. 1153| if any (def: def.value._type or "" == "order") defs''.values then | ^ 1154| sortProperties defs''.values … while evaluating the attribute 'values' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1286:7: 1285| { 1286| values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs; | ^ 1287| inherit highestPrio; … while calling the 'concatMap' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1286:16: 1285| { 1286| values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs; | ^ 1287| inherit highestPrio; … while calling the 'concatMap' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1133:17: 1132| # Process mkMerge and mkIf properties. 1133| defs' = concatMap ( | ^ 1134| m: … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1134:11: 1133| defs' = concatMap ( 1134| m: | ^ 1135| map ( … while calling the 'map' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1135:11: 1134| m: 1135| map ( | ^ 1136| value: … while calling the 'addErrorContext' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:14: 1143| } 1144| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) | ^ 1145| ) defs; … while evaluating definitions from `/nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix': … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80: 1143| } 1144| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) | ^ 1145| ) defs; … while calling 'dischargeProperties' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5: 1236| dischargeProperties = 1237| def: | ^ 1238| if def._type or "" == "merge" then … while evaluating an expression to select '_type' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating def at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:805:21: 804| inherit (module) file; 805| inherit value; | ^ 806| }) module.config … while evaluating system at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:400:79: 399| system.build.toplevel = 400| if config.system.includeBuildDependencies then systemWithBuildDeps else system; | ^ 401| … while evaluating baseSystemAssertWarn at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:89:7: 88| # Avoid IFD if possible, by sidestepping replaceDependencies if no replacements are specified. 89| baseSystemAssertWarn | ^ 90| else … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:80:26: 79| # Handle assertions and warnings 80| baseSystemAssertWarn = lib.asserts.checkAssertWarn config.assertions config.warnings baseSystem; | ^ 81| … while calling 'checkAssertWarn' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/asserts.nix:193:27: 192| checkAssertWarn = 193| assertions: warnings: val: | ^ 194| let … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/asserts.nix:200:7: 199| else 200| showWarnings warnings val; | ^ 201| … while calling 'showWarnings' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:962:28: 961| 962| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings; | ^ 963| … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:962:33: 961| 962| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings; | ^ 963| … while calling 'foldr' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/lists.nix:139:14: 138| foldr = 139| op: nul: list: | ^ 140| let … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/lists.nix:144:5: 143| in 144| fold' 0; | ^ 145| … while calling 'fold'' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/lists.nix:142:15: 141| len = length list; 142| fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1)); | ^ 143| in … while evaluating nul at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/lists.nix:142:35: 141| len = length list; 142| fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1)); | ^ 143| in … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:62:16: 61| # makes it bootable. See `activatable-system.nix`. 62| baseSystem = pkgs.stdenvNoCC.mkDerivation ( | ^ 63| { … while calling 'mkDerivation' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:66:18: 65| */ 66| mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs); | ^ 67| … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:66:29: 65| */ 66| mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs); | ^ 67| … while calling 'makeDerivationExtensible' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:77:5: 76| makeDerivationExtensible = 77| rattrs: | ^ 78| let … while evaluating finalPackage at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:137:5: 136| in 137| finalPackage; | ^ 138| … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:134:22: 133| 134| finalPackage = mkDerivationSimple overrideAttrs args; | ^ 135| … while evaluating rattrs at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:84:14: 83| # An infinite recursion here can be caused by having the attribute names of expression `e` in `.overrideAttrs(finalAttrs: previousAttrs: e)` depend on `finalAttrs`. Only the attribute values of `e` can depend on `finalAttrs`. 84| args = rattrs (args // { inherit finalPackage overrideAttrs; }); | ^ 85| # ^^^^ … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:66:55: 65| */ 66| mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs); | ^ 67| … while calling 'toFunction' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:1100:16: 1099| */ 1100| toFunction = v: if isFunction v then v else k: v; | ^ 1101| … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:1100:22: 1099| */ 1100| toFunction = v: if isFunction v then v else k: v; | ^ 1101| … while calling 'isFunction' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:1023:16: 1022| */ 1023| isFunction = f: builtins.isFunction f || (f ? __functor && isFunction (f.__functor f)); | ^ 1024| … while calling the 'isFunction' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:1023:19: 1022| */ 1023| isFunction = f: builtins.isFunction f || (f ? __functor && isFunction (f.__functor f)); | ^ 1024| … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/top-level.nix:76:22: 75| } 76| // config.system.systemBuilderArgs | ^ 77| ); … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17: 1191| mapAttrs ( 1192| name: value: | ^ 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85: 1192| name: value: 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value | ^ 1194| ); … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71: 274| # For definitions that have an associated option 275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options; | ^ 276| … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:7: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while calling the 'addErrorContext' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:15: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while evaluating the option `system.systemBuilderArgs': … while evaluating the attribute 'mergedValue' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1165:5: 1164| # Type-check the remaining definitions, and merge them. Or throw if no definitions. 1165| mergedValue = | ^ 1166| if isDefined then … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1168:11: 1167| if all (def: type.check def.value) defsFinal then 1168| type.merge loc defsFinal | ^ 1169| else … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:831:22: 830| # Non-lazy merge Function 831| loc: defs: | ^ 832| mapAttrs (n: v: v.value) ( … while calling the 'mapAttrs' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:832:17: 831| loc: defs: 832| mapAttrs (n: v: v.value) ( | ^ 833| filterAttrs (n: v: v ? value) ( … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:833:19: 832| mapAttrs (n: v: v.value) ( 833| filterAttrs (n: v: v ? value) ( | ^ 834| zipAttrsWith (name: defs: (mergeDefinitions (loc ++ [ name ]) elemType (defs)).optionalValue) … while calling 'filterAttrs' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:23: 666| */ 667| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set)); | ^ 668| … while calling the 'removeAttrs' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:28: 666| */ 667| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set)); | ^ 668| … while calling the 'filter' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:45: 666| */ 667| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set)); | ^ 668| … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:53: 666| */ 667| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set)); | ^ 668| … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:60: 666| */ 667| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set)); | ^ 668| … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:833:35: 832| mapAttrs (n: v: v.value) ( 833| filterAttrs (n: v: v ? value) ( | ^ 834| zipAttrsWith (name: defs: (mergeDefinitions (loc ++ [ name ]) elemType (defs)).optionalValue) … while evaluating v at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:833:38: 832| mapAttrs (n: v: v.value) ( 833| filterAttrs (n: v: v ? value) ( | ^ 834| zipAttrsWith (name: defs: (mergeDefinitions (loc ++ [ name ]) elemType (defs)).optionalValue) … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:667:74: 666| */ 667| filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set)); | ^ 668| … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:834:41: 833| filterAttrs (n: v: v ? value) ( 834| zipAttrsWith (name: defs: (mergeDefinitions (loc ++ [ name ]) elemType (defs)).optionalValue) | ^ 835| # Push down position info. … while evaluating the attribute 'optionalValue' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1182:5: 1181| 1182| optionalValue = if isDefined then { value = mergedValue; } else { }; | ^ 1183| }; … while evaluating isDefined at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1182:24: 1181| 1182| optionalValue = if isDefined then { value = mergedValue; } else { }; | ^ 1183| }; (9 duplicate frames omitted) … while evaluating definitions from `/nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activatable-system.nix': … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80: 1143| } 1144| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) | ^ 1145| ) defs; … while calling 'dischargeProperties' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5: 1236| dischargeProperties = 1237| def: | ^ 1238| if def._type or "" == "merge" then … while evaluating an expression to select '_type' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating def at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:774:15: 773| inherit (def) file; 774| value = v; | ^ 775| }) def.value … while evaluating the attribute 'system.activationScripts.script' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:172:11: 171| // { 172| script = systemActivationScript set false; | ^ 173| }; … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:172:20: 171| // { 172| script = systemActivationScript set false; | ^ 173| }; … while calling 'systemActivationScript' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:30:10: 29| systemActivationScript = 30| set: onlyDry: | ^ 31| let … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:71:9: 70| 71| ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)} | ^ 72| … while calling 'textClosureMap' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings-with-deps.nix:168:20: 167| textClosureMap = 168| f: predefined: names: | ^ 169| concatStringsSep "\n" (map f (textClosureList predefined names)); … while calling the 'concatStringsSep' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings-with-deps.nix:169:5: 168| f: predefined: names: 169| concatStringsSep "\n" (map f (textClosureList predefined names)); | ^ 170| … while calling 'id' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:40:8: 39| */ 40| id = x: x; | ^ 41| … while evaluating x at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/trivial.nix:40:11: 39| */ 40| id = x: x; | ^ 41| … while evaluating the attribute 'text' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:17:7: 16| // { 17| text = '' | ^ 18| #### Activation script snippet ${a}: … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/activation/activation-script.nix:20:13: 19| _localstatus=0 20| ${v.text} | ^ 21| … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17: 1191| mapAttrs ( 1192| name: value: | ^ 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85: 1192| name: value: 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value | ^ 1194| ); … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71: 274| # For definitions that have an associated option 275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options; | ^ 276| … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:7: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while calling the 'addErrorContext' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:15: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while evaluating the option `system.activationScripts.etc.text': (11 duplicate frames omitted) … while evaluating definitions from `/nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc-activation.nix': … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80: 1143| } 1144| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) | ^ 1145| ) defs; … while calling 'dischargeProperties' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5: 1236| dischargeProperties = 1237| def: | ^ 1238| if def._type or "" == "merge" then … while evaluating an expression to select '_type' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating def at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:805:21: 804| inherit (module) file; 805| inherit value; | ^ 806| }) module.config … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc-activation.nix:19:29: 18| "specialfs" 19| ] config.system.build.etcActivationCommands; | ^ 20| } … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1539:14: 1538| zipAttrsWith ( 1539| n: values: | ^ 1540| let … while calling the 'head' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1544:13: 1543| if length values == 1 || pred here (elemAt values 1) (head values) then 1544| head values | ^ 1545| else … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:818:27: 817| ( 818| name: defs: | ^ 819| let … while evaluating the attribute 'optionalValue.value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1182:5: 1181| 1182| optionalValue = if isDefined then { value = mergedValue; } else { }; | ^ 1183| }; … while evaluating an expression to select 'value' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:823:42: 822| in 823| merged.optionalValue.value or elemType.emptyValue.value or merged.mergedValue | ^ 824| ) (10 duplicate frames omitted) … while evaluating definitions from `/nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix': … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80: 1143| } 1144| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) | ^ 1145| ) defs; … while calling 'dischargeProperties' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5: 1236| dischargeProperties = 1237| def: | ^ 1238| if def._type or "" == "merge" then … while evaluating an expression to select '_type' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating def at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/types.nix:774:15: 773| inherit (def) file; 774| value = v; | ^ 775| }) def.value … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:293:73: 292| len = length attrPath; 293| atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); }; | ^ 294| in … while calling 'atDepth' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:293:17: 292| len = length attrPath; 293| atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); }; | ^ 294| in … while evaluating value at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:293:37: 292| len = length attrPath; 293| atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); }; | ^ 294| in … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:805:21: 804| inherit (module) file; 805| inherit value; | ^ 806| }) module.config … while calling the 'getAttr' builtin at «internal»:1:500: … while calling the 'derivationStrict' builtin at «internal»:1:208: … while evaluating derivation 'etc' whose name attribute is located at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/stdenv/generic/make-derivation.nix:480:13 … while evaluating attribute 'buildCommand' of derivation 'etc' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/build-support/trivial-builders/default.nix:80:17: 79| enableParallelBuilding = true; 80| inherit buildCommand name; | ^ 81| passAsFile = [ "buildCommand" ] ++ (derivationArgs.passAsFile or [ ]); … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:56:11: 55| mkdir -p "$out/etc" 56| ${lib.concatMapStringsSep "\n" ( | ^ 57| etcEntry: … while calling 'concatMapStringsSep' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:231:13: 230| concatMapStringsSep = 231| sep: f: list: | ^ 232| concatStringsSep sep (map f list); … while calling the 'concatStringsSep' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:232:5: 231| sep: f: list: 232| concatStringsSep sep (map f list); | ^ 233| … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:57:11: 56| ${lib.concatMapStringsSep "\n" ( 57| etcEntry: | ^ 58| lib.escapeShellArgs [ … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:58:11: 57| etcEntry: 58| lib.escapeShellArgs [ | ^ 59| "makeEtcEntry" … while calling 'concatMapStringsSep' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:231:13: 230| concatMapStringsSep = 231| sep: f: list: | ^ 232| concatStringsSep sep (map f list); … while calling the 'concatStringsSep' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:232:5: 231| sep: f: list: 232| concatStringsSep sep (map f list); | ^ 233| … while calling 'escapeShellArg' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:1171:5: 1170| escapeShellArg = 1171| arg: | ^ 1172| let … while calling the 'match' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:1175:8: 1174| in 1175| if match "[[:alnum:],._+:@%/-]+" string == null then | ^ 1176| "'${replaceString "'" "'\\''" string}'" … while evaluating the second argument passed to builtins.match … while calling the 'toString' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:1173:16: 1172| let 1173| string = toString arg; | ^ 1174| in … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:61:25: 60| # Force local source paths to be added to the store 61| "${etcEntry.source}" | ^ 62| etcEntry.target … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17: 1191| mapAttrs ( 1192| name: value: | ^ 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85: 1192| name: value: 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value | ^ 1194| ); … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71: 274| # For definitions that have an associated option 275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options; | ^ 276| … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:7: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while calling the 'addErrorContext' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:15: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while evaluating the option `environment.etc."direnv/direnvrc".source': (14 duplicate frames omitted) … while calling the 'isBool' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1241:10: 1240| else if def._type or "" == "if" then 1241| if isBool def.condition then | ^ 1242| if def.condition then dischargeProperties def.content else [ ] … while evaluating the attribute 'condition' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1397:13: 1396| _type = "if"; 1397| inherit condition content; | ^ 1398| }; … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/system/etc/etc.nix:225:43: 224| target = lib.mkDefault name; 225| source = lib.mkIf (config.text != null) ( | ^ 226| let … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17: 1191| mapAttrs ( 1192| name: value: | ^ 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85: 1192| name: value: 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value | ^ 1194| ); … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71: 274| # For definitions that have an associated option 275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options; | ^ 276| … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:7: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while calling the 'addErrorContext' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:15: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while evaluating the option `environment.etc."direnv/direnvrc".text': (11 duplicate frames omitted) … while evaluating definitions from `/nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix': … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1144:80: 1143| } 1144| ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) | ^ 1145| ) defs; … while calling 'dischargeProperties' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1237:5: 1236| dischargeProperties = 1237| def: | ^ 1238| if def._type or "" == "merge" then … while evaluating an expression to select '_type' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating def at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1238:8: 1237| def: 1238| if def._type or "" == "merge" then | ^ 1239| concatMap dischargeProperties def.contents … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:805:21: 804| inherit (module) file; 805| inherit value; | ^ 806| }) module.config … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix:166:13: 165| "direnv/direnvrc".text = '' 166| ${lib.optionalString cfg.nix-direnv.enable '' | ^ 167| #Load nix-direnv … while calling 'optionalString' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:736:26: 735| */ 736| optionalString = cond: string: if cond then string else ""; | ^ 737| … while evaluating string at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/strings.nix:736:47: 735| */ 736| optionalString = cond: string: if cond then string else ""; | ^ 737| … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix:168:37: 167| #Load nix-direnv 168| source ${cfg.nix-direnv.package}/share/nix-direnv/direnvrc | ^ 169| ''} … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1192:17: 1191| mapAttrs ( 1192| name: value: | ^ 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value … from call site at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/attrsets.nix:1193:85: 1192| name: value: 1193| if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value | ^ 1194| ); … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:275:71: 274| # For definitions that have an associated option 275| declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options; | ^ 276| … while evaluating the attribute 'value' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:7: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while calling the 'addErrorContext' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1118:15: 1117| // { 1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 1119| inherit (res.defsFinal') highestPrio; … while evaluating the option `programs.direnv.nix-direnv.package': … while evaluating the attribute 'mergedValue' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1165:5: 1164| # Type-check the remaining definitions, and merge them. Or throw if no definitions. 1165| mergedValue = | ^ 1166| if isDefined then … while evaluating isDefined at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1166:10: 1165| mergedValue = 1166| if isDefined then | ^ 1167| if all (def: type.check def.value) defsFinal then … while evaluating defsFinal at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1180:17: 1179| 1180| isDefined = defsFinal != [ ]; | ^ 1181| … while evaluating the attribute 'values' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1159:9: 1158| { 1159| values = defs'''; | ^ 1160| inherit (defs'') highestPrio; … while calling the 'any' builtin at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1153:14: 1152| # Avoid sorting if we don't have to. 1153| if any (def: def.value._type or "" == "order") defs''.values then | ^ 1154| sortProperties defs''.values … while calling anonymous lambda at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1153:19: 1152| # Avoid sorting if we don't have to. 1153| if any (def: def.value._type or "" == "order") defs''.values then | ^ 1154| sortProperties defs''.values … while evaluating the attribute 'value._type' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1283:67: 1282| strip = 1283| def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def; | ^ 1284| in … while evaluating an expression to select '_type' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1153:34: 1152| # Avoid sorting if we don't have to. 1153| if any (def: def.value._type or "" == "order") defs''.values then | ^ 1154| sortProperties defs''.values … while evaluating the attribute 'value.content' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/lib/modules.nix:1416:22: 1415| _type = "override"; 1416| inherit priority content; | ^ 1417| }; … while evaluating the attribute 'default' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix:74:9: 73| package = lib.mkOption { 74| default = pkgs.nix-direnv.override { nix = config.nix.package; }; | ^ 75| defaultText = "pkgs.nix-direnv"; … while evaluating the attribute 'nix-direnv.override' at /nix/store/2rgi6ky1nb03l6di8sqszb1kyv5kfy35-s23x13jdh2faxm3xfmnahr42sjnp3xcr-source/modules/nixos/nix/default.nix:57:9: 56| # Below is broken as of 26/9/2025, see https://git.lix.systems/lix-project/lix/issues/980 57| nix-direnv | ^ 58| nix-eval-jobs … while evaluating an expression to select 'override' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/nixos/modules/programs/direnv.nix:74:35: 73| package = lib.mkOption { 74| default = pkgs.nix-direnv.override { nix = config.nix.package; }; | ^ 75| defaultText = "pkgs.nix-direnv"; … while evaluating the attribute 'nix-direnv' at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/tools/package-management/lix/default.nix:103:11: 102| 103| nix-direnv = nix-direnv.override { | ^ 104| nix = self.lix; … while evaluating an expression to select 'override' on it at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/tools/package-management/lix/default.nix:103:24: 102| 103| nix-direnv = nix-direnv.override { | ^ 104| nix = self.lix; … while evaluating nix-direnv at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/tools/package-management/lix/default.nix:103:24: 102| 103| nix-direnv = nix-direnv.override { | ^ 104| nix = self.lix; error: infinite recursion encountered at /nix/store/r33xw4w5nmpmfac4g47h1lmrcl4qlz7k-source/pkgs/tools/package-management/lix/default.nix:103:24: 102| 103| nix-direnv = nix-direnv.override { | ^ 104| nix = self.lix; Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/home/joe/.nixos-config#nixosConfigurations."timber-hearth".config.system.build.toplevel' --show-trace --no-link' returned non-zero exit status 1. ``` </details>
Author

The thing that's extra confusing is that I get the error even when providing a new value for package (which I would think would avoid the recursion by giving it a new value?

Also if Lix still lazy evaluates, when I removed the nix-direnv bit of config from programs.direnv, the package property shouldn't even evaluate because the property shouldn't even be read? or am I misunderstanding?

The thing that's extra confusing is that I get the error even when providing a new value for package (which I would think would avoid the recursion by giving it a new value? Also if Lix still lazy evaluates, when I removed the nix-direnv bit of config from programs.direnv, the package property shouldn't even evaluate because the property shouldn't even be read? or am I misunderstanding?
Author

Also tried building with the latest version of the instructions from the page (which states to use final not prev as in this thread) and had the same issue.

Is the solution here maybe just to override programs.direnv as well?

Also tried building with the latest version of the instructions from the page (which states to use final not prev as in this thread) and had the same issue. Is the solution here maybe just to override programs.direnv as well?
Owner

@joegilkes wrote in #980 (comment):

Possibly? I think the recursion is coming from nix-direnv already being overridden here, so when the lix overlay also overrides the same package (through pkgs.lixPackageSets.stable.nix-direnv) it gets caught up trying to apply the overrides on top of each other?

I'm not sure how this would be solved on either end, is it a case of giving the overrides a priority and applying them in sequence somehow? I haven't been able to find any similar instances online.

Full trace when trying to overlay nix-direnv

That's correct.

The solution here is to remove nix-direnv from your overrides. As long as you do nix.package = pkgs.lixPackageSets.lix.stable;, nix-direnv will follow through as long as they keep this API.

It's quite uncommon/unexpected for a package to perform such things and this renders overlaying more complicated as you can see.

I will update the instructions to take into account this aspect, thank you all.

@joegilkes wrote in https://git.lix.systems/lix-project/lix/issues/980#issuecomment-14626: > Possibly? I think the recursion is coming from `nix-direnv` already being overridden [here](https://github.com/NixOS/nixpkgs/blob/5a1cf2923635c75744eb9f1844eb91b1dd2931cc/nixos/modules/programs/direnv.nix#L74), so when the lix overlay also overrides the same package (through `pkgs.lixPackageSets.stable.nix-direnv`) it gets caught up trying to apply the overrides on top of each other? > > I'm not sure how this would be solved on either end, is it a case of giving the overrides a priority and applying them in sequence somehow? I haven't been able to find any similar instances online. > > Full trace when trying to overlay `nix-direnv` That's correct. The solution here is to remove `nix-direnv` from your overrides. As long as you do `nix.package = pkgs.lixPackageSets.lix.stable;`, `nix-direnv` will follow through as long as they keep this API. It's quite uncommon/unexpected for a package to perform such things and this renders overlaying more complicated as you can see. I will update the instructions to take into account this aspect, thank you all.
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#980
No description provided.