Error when building NixOs

When Im trying to build my new nixos config i get this error, and I dont know how to fix it, does somebody know whats happening ?

error: attempt to call something which is not a function but a set

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:58:21:

           57|           f = self: super:
           58|             let x = f0 super;
             |                     ^
           59|             in

if anyone wondering

~/D/nix-config 󰥓 sudo nixos-rebuild --flake .#nixos build --show-trace
[sudo] password for aurel:
building the system configuration...
warning: Git tree '/home/aurel/Documents/nix-config' is dirty
error:
       … while evaluating the attribute 'activationScript' of the derivation 'nixos-system-nixos-23.05.20230610.d3bb401'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:303:7:

          302|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          303|       name =
             |       ^
          304|         let

       … while evaluating the attribute 'system.activationScripts.script'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/system/activation/activation-script.nix:137:9:

          136|       apply = set: set // {
          137|         script = systemActivationScript set false;
             |         ^
          138|       };

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/system/activation/activation-script.nix:137:18:

          136|       apply = set: set // {
          137|         script = systemActivationScript set false;
             |                  ^
          138|       };

       … while calling 'systemActivationScript'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/system/activation/activation-script.nix:20:33:

           19|
           20|   systemActivationScript = set: onlyDry: let
             |                                 ^
           21|     set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/system/activation/activation-script.nix:49:9:

           48|
           49|       ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
             |         ^
           50|

       … while calling 'textClosureMap'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/strings-with-deps.nix:75:35:

           74|
           75|   textClosureMap = f: predefined: names:
             |                                   ^
           76|     concatStringsSep "\n" (map f (textClosureList predefined names));

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling 'id'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/trivial.nix:14:5:

           13|     # The value to return
           14|     x: x;
             |     ^
           15|

       … while evaluating the attribute 'text'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/system/activation/activation-script.nix:9:5:

            8|   addAttributeName = mapAttrs (a: v: v // {
            9|     text = ''
             |     ^
           10|       #### Activation script snippet ${a}:

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling 'g'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:595:19:

          594|           g =
          595|             name: value:
             |                   ^
          596|             if isAttrs value && cond value

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:598:20:

          597|               then recurse (path ++ [name]) value
          598|               else f (path ++ [name]) value;
             |                    ^
          599|         in mapAttrs g;

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:248:72:

          247|           # For definitions that have an associated option
          248|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          249|

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:759:9:

          758|     in warnDeprecation opt //
          759|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          760|         inherit (res.defsFinal') highestPrio;

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

       … while evaluating the attribute 'mergedValue'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:794:5:

          793|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          794|     mergedValue =
             |     ^
          795|       if isDefined then

       … while evaluating the attribute 'values'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:788:9:

          787|       in {
          788|         values = defs''';
             |         ^
          789|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'values'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:887:7:

          886|     in {
          887|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          888|       inherit highestPrio;

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:774:17:

          773|         # Process mkMerge and mkIf properties.
          774|         defs' = concatMap (m:
             |                 ^
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:774:28:

          773|         # Process mkMerge and mkIf properties.
          774|         defs' = concatMap (m:
             |                            ^
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

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

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:775:137:

          774|         defs' = concatMap (m:
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          776|         ) defs;

       … while calling 'dischargeProperties'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:846:25:

          845|   */
          846|   dischargeProperties = def:
             |                         ^
          847|     if def._type or "" == "merge" then

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:599:44:

          598|       defnsByName' = byName "config" (module: value:
          599|           [{ inherit (module) file; inherit value; }]
             |                                            ^
          600|         ) configs;

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:776:24:

          775|     let f = attrPath:
          776|       zipAttrsWith (n: values:
             |                        ^
          777|         let here = attrPath ++ [n]; in

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:554:29:

          553|       merge = loc: defs:
          554|         zipAttrsWith (name: defs:
             |                             ^
          555|           let merged = mergeDefinitions (loc ++ [name]) elemType defs;

       … while evaluating the attribute 'optionalValue.value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:806:5:

          805|
          806|     optionalValue =
             |     ^
          807|       if isDefined then { value = mergedValue; }

       … while evaluating the attribute 'values'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:788:9:

          787|       in {
          788|         values = defs''';
             |         ^
          789|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'values'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:887:7:

          886|     in {
          887|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          888|       inherit highestPrio;

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:774:17:

          773|         # Process mkMerge and mkIf properties.
          774|         defs' = concatMap (m:
             |                 ^
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:774:28:

          773|         # Process mkMerge and mkIf properties.
          774|         defs' = concatMap (m:
             |                            ^
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

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

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:775:137:

          774|         defs' = concatMap (m:
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          776|         ) defs;

       … while calling 'dischargeProperties'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:846:25:

          845|   */
          846|   dischargeProperties = def:
             |                         ^
          847|     if def._type or "" == "merge" then

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:560:58:

          559|         # Push down position info.
          560|         (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs);
             |                                                          ^
          561|       emptyValue = { value = {}; };

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:88:39:

           87|         then value
           88|         else { ${elemAt attrPath n} = atDepth (n + 1); };
             |                                       ^
           89|     in atDepth 0;

       … while calling 'atDepth'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:85:17:

           84|       len = length attrPath;
           85|       atDepth = n:
             |                 ^
           86|         if n == len

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:599:44:

          598|       defnsByName' = byName "config" (module: value:
          599|           [{ inherit (module) file; inherit value; }]
             |                                            ^
          600|         ) configs;

       … while evaluating the attribute 'buildCommand' of the derivation 'etc'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:303:7:

          302|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          303|       name =
             |       ^
          304|         let

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/system/etc/etc.nix:54:7:

           53|     mkdir -p "$out/etc"
           54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
             |       ^
           55|       "makeEtcEntry"

       … while calling 'concatMapStringsSep'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/strings.nix:116:5:

          115|     # List of input strings
          116|     list: concatStringsSep sep (map f list);
             |     ^
          117|

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/system/etc/etc.nix:54:33:

           53|     mkdir -p "$out/etc"
           54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
             |                                 ^
           55|       "makeEtcEntry"

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/system/etc/etc.nix:54:43:

           53|     mkdir -p "$out/etc"
           54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
             |                                           ^
           55|       "makeEtcEntry"

       … while calling 'concatMapStringsSep'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/strings.nix:116:5:

          115|     # List of input strings
          116|     list: concatStringsSep sep (map f list);
             |     ^
          117|

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling 'escapeShellArg'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/strings.nix:427:20:

          426|   */
          427|   escapeShellArg = arg: "'${replaceStrings ["'"] ["'\\''"] (toString arg)}'";
             |                    ^
          428|

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling 'g'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:595:19:

          594|           g =
          595|             name: value:
             |                   ^
          596|             if isAttrs value && cond value

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:598:20:

          597|               then recurse (path ++ [name]) value
          598|               else f (path ++ [name]) value;
             |                    ^
          599|         in mapAttrs g;

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:248:72:

          247|           # For definitions that have an associated option
          248|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          249|

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:759:9:

          758|     in warnDeprecation opt //
          759|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          760|         inherit (res.defsFinal') highestPrio;

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

       … while evaluating the attribute 'mergedValue'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:794:5:

          793|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          794|     mergedValue =
             |     ^
          795|       if isDefined then

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:796:12:

          795|       if isDefined then
          796|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |            ^
          797|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:796:17:

          795|       if isDefined then
          796|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                 ^
          797|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:796:22:

          795|       if isDefined then
          796|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                      ^
          797|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling 'check'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:490:15:

          489|       descriptionClass = "noun";
          490|       check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
             |               ^
          491|       merge = mergeEqualOption;

       … while evaluating the attribute 'serviceDirectories' of the derivation 'dbus-1'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:303:7:

          302|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          303|       name =
             |       ^
          304|         let

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:500:14:

          499|       merge = loc: defs:
          500|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
             |              ^
          501|           imap1 (m: def':

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:807:27:

          806|     optionalValue =
          807|       if isDefined then { value = mergedValue; }
             |                           ^
          808|       else {};

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:796:12:

          795|       if isDefined then
          796|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |            ^
          797|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:796:17:

          795|       if isDefined then
          796|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                 ^
          797|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:796:22:

          795|       if isDefined then
          796|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                      ^
          797|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling 'check'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:490:15:

          489|       descriptionClass = "noun";
          490|       check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
             |               ^
          491|       merge = mergeEqualOption;

       … while evaluating the attribute 'passAsFile' of the derivation 'system-path'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:303:7:

          302|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          303|       name =
             |       ^
          304|         let

       … while evaluating the attribute 'passAsFile'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/build-support/buildenv/default.nix:77:5:

           76|     # XXX: The size is somewhat arbitrary
           77|     passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ];
             |     ^
           78|   }

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling 'g'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:595:19:

          594|           g =
          595|             name: value:
             |                   ^
          596|             if isAttrs value && cond value

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:598:20:

          597|               then recurse (path ++ [name]) value
          598|               else f (path ++ [name]) value;
             |                    ^
          599|         in mapAttrs g;

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:248:72:

          247|           # For definitions that have an associated option
          248|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          249|

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:759:9:

          758|     in warnDeprecation opt //
          759|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          760|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `environment.systemPackages':

       … while evaluating the attribute 'mergedValue'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:794:5:

          793|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          794|     mergedValue =
             |     ^
          795|       if isDefined then

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:796:59:

          795|       if isDefined then
          796|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                                                           ^
          797|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

      … while calling 'merge'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:499:20:

          498|       check = isList;
          499|       merge = loc: defs:
             |                    ^
          500|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:500:35:

          499|       merge = loc: defs:
          500|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
             |                                   ^
          501|           imap1 (m: def':

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/lists.nix:117:29:

          116|   */
          117|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                             ^
          118|

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/lists.nix:117:32:

          116|   */
          117|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                                ^
          118|

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:501:21:

          500|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
          501|           imap1 (m: def':
             |                     ^
          502|             (mergeDefinitions

       … while evaluating the attribute 'optionalValue'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:806:5:

          805|
          806|     optionalValue =
             |     ^
          807|       if isDefined then { value = mergedValue; }

       … while evaluating the attribute 'values'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:788:9:

          787|       in {
          788|         values = defs''';
             |         ^
          789|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'values'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:887:7:

          886|     in {
          887|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          888|       inherit highestPrio;

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:774:17:

          773|         # Process mkMerge and mkIf properties.
          774|         defs' = concatMap (m:
             |                 ^
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:774:28:

          773|         # Process mkMerge and mkIf properties.
          774|         defs' = concatMap (m:
             |                            ^
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/nixos/modules/services/x11/window-managers/dwm.nix':

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:775:137:

          774|         defs' = concatMap (m:
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          776|         ) defs;

       … while calling 'dischargeProperties'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:846:25:

          845|   */
          846|   dischargeProperties = def:
             |                         ^
          847|     if def._type or "" == "merge" then

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/types.nix:505:38:

          504|               elemType
          505|               [{ inherit (def) file; value = def'; }]
             |                                      ^
          506|             ).optionalValue

       … while evaluating call site

       at «none»:0: (source not available)

       … while calling 'g'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:595:19:

          594|           g =
          595|             name: value:
             |                   ^
          596|             if isAttrs value && cond value

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/attrsets.nix:598:20:

          597|               then recurse (path ++ [name]) value
          598|               else f (path ++ [name]) value;
             |                    ^
          599|         in mapAttrs g;

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:248:72:

          247|           # For definitions that have an associated option
          248|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          249|

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:759:9:

          758|     in warnDeprecation opt //
          759|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          760|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `services.xserver.windowManager.dwm.package':

       … while evaluating the attribute 'mergedValue'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:794:5:

          793|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          794|     mergedValue =
             |     ^
          795|       if isDefined then

       … while evaluating the attribute 'values'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:788:9:

          787|       in {
          788|         values = defs''';
             |         ^
          789|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'values'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:887:7:

          886|     in {
          887|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          888|       inherit highestPrio;

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:774:17:

          773|         # Process mkMerge and mkIf properties.
          774|         defs' = concatMap (m:
             |                 ^
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:774:28:

          773|         # Process mkMerge and mkIf properties.
          774|         defs' = concatMap (m:
             |                            ^
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/b77la0a6qpk78bajahc0865n97wihzxz-source/nixos/configuration.nix':

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:775:137:

          774|         defs' = concatMap (m:
          775|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          776|         ) defs;

       … while calling 'dischargeProperties'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:846:25:

          845|   */
          846|   dischargeProperties = def:
             |                         ^
          847|     if def._type or "" == "merge" then

       … while evaluating the attribute 'value'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/modules.nix:599:44:

          598|       defnsByName' = byName "config" (module: value:
          599|           [{ inherit (module) file; inherit value; }]
             |                                            ^
          600|         ) configs;

       … while evaluating call site

       at /nix/store/b77la0a6qpk78bajahc0865n97wihzxz-source/nixos/configuration.nix:75:17:

           74|       enable = true;
           75|       package = pkgs.dwm.overrideAttrs { src = /home/aurel/.config/dwmi; };
             |                 ^
           76|     };

       … while calling 'overrideAttrs'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:96:73:

           95|           overrideDerivation = fdrv: overrideResult (x: overrideDerivation x fdrv);
           96|           ${if result ? overrideAttrs then "overrideAttrs" else null} = fdrv:
             |                                                                         ^
           97|             overrideResult (x: x.overrideAttrs fdrv);

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:97:13:

           96|           ${if result ? overrideAttrs then "overrideAttrs" else null} = fdrv:
           97|             overrideResult (x: x.overrideAttrs fdrv);
             |             ^
           98|         }

       … while calling 'overrideResult'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:90:24:

           89|       # Change the result of the function call by applying g to it
           90|       overrideResult = g: makeOverridable (copyArgs (args: g (f args))) origArgs;
             |                        ^
           91|     in

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:90:27:

           89|       # Change the result of the function call by applying g to it
           90|       overrideResult = g: makeOverridable (copyArgs (args: g (f args))) origArgs;
             |                           ^
           91|     in

       … while calling 'makeOverridable'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:78:24:

           77|   */
           78|   makeOverridable = f: origArgs:
             |                        ^
           79|     let

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:80:16:

           79|     let
           80|       result = f origArgs;
             |                ^
           81|

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:90:54:

           89|       # Change the result of the function call by applying g to it
           90|       overrideResult = g: makeOverridable (copyArgs (args: g (f args))) origArgs;
             |                                                      ^
           91|     in

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:90:60:

           89|       # Change the result of the function call by applying g to it
           90|       overrideResult = g: makeOverridable (copyArgs (args: g (f args))) origArgs;
             |                                                            ^
           91|     in

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:97:29:

           96|           ${if result ? overrideAttrs then "overrideAttrs" else null} = fdrv:
           97|             overrideResult (x: x.overrideAttrs fdrv);
             |                             ^
           98|         }

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/lib/customisation.nix:97:32:

           96|           ${if result ? overrideAttrs then "overrideAttrs" else null} = fdrv:
           97|             overrideResult (x: x.overrideAttrs fdrv);
             |                                ^
           98|         }

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:55:8:

           54|     mkDerivationSimple
           55|       (f0:
             |        ^
           56|         let

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:65:11:

           64|         in
           65|           makeDerivationExtensible (self: attrs // f self attrs))
             |           ^
           66|       attrs;

       … while calling 'makeDerivationExtensible'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:14:30:

           13|   # Based off lib.makeExtensible, with modifications:
           14|   makeDerivationExtensible = rattrs:
             |                              ^
           15|     let

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:21:14:

           20|       # 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`.
           21|       args = rattrs (args // { inherit finalPackage overrideAttrs; });
             |              ^
           22|       #              ^^^^

       … while calling anonymous lambda

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:65:37:

           64|         in
           65|           makeDerivationExtensible (self: attrs // f self attrs))
             |                                     ^
           66|       attrs;

       … while evaluating call site

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:65:52:

           64|         in
           65|           makeDerivationExtensible (self: attrs // f self attrs))
             |                                                    ^
           66|       attrs;

       … while calling 'f'

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:57:21:

           56|         let
           57|           f = self: super:
             |                     ^
           58|             let x = f0 super;

       error: attempt to call something which is not a function but a set

       at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:58:21:

           57|           f = self: super:
           58|             let x = f0 super;
             |                     ^
           59|             in

Can you share your configuration.nix?

Hard to say what exactly you’re doing wrong without seeing it, but from the logs it looks like you’re using a value with a wrong type somewhere in your dwm options. Or not, nix traces have a ridiculous noise-to-signal ratio.

Here is my dwm and nixos setup :

It’s this line: https://github.com/aurreland/nix-config/blob/d2dbc504789b860c31ac745a6d1469466d438d7c/nixos/configuration.nix#L75

Should be:

pkgs.dwm.overrideAttrs (old: { src = /home/aurel/.config/dwmi; });

i changed it but now i get this error :

error: access to absolute path '/home/aurel/.config/dwm' is forbidden in pure eval mode (use '--impure' to override)
(use '--show-trace' to show detailed location information)

Yep, if you’re using flakes you can’t access absolute paths. Either make your ~/.config/dwim a subdirectory of your flake or turn the config into a flake as well and use it as an input.

Or use impure.

1 Like

Ok everything is working thx