Skip to content

agenix-template + environmentFile fails with "/run forbidden in pure eval" error #188

@morganlabs

Description

@morganlabs

I'm trying to enable RCON on a services.minecraft-servers.servers.fabric instance with an agenix-encrypted password via agenix-template -> environmentFile -> rcon.password = "@RWA_RCON_PASSWORD@".

Here's the simplified code:

{ config, lib, vars, ... }:
with lib;
let
  cfg = config.modules.services.minecraft-server.rcon;
in
{
  options.modules.services.minecraft-server.rcon = {
    enable = mkEnableOption "Enable services.minecraft-server.rcon";
  };

  config = mkIf cfg.enable {
    age.secrets.minecraft-rcon-password.file = ../../../secrets/${vars.hostname}/minecraft-rcon-password.age;

    age-template.files."rcon-env" = {
      vars.rconPassword = config.age.secrets.minecraft-rcon-password.path;
      content = ''
        RWA_RCON_PASSWORD=$rconPassword
      '';
    };

    services.minecraft-servers.servers = {
      environmentFile = config.age-template.files."rcon-env".path;
      fabric.serverProperties = {
        "enable-rcon" = true;
        "rcon.password" = "@RWA_RCON_PASSWORD@";
        "rcon.port" = ports.rcon;
      };
    };
  };
}

Error with full trace:

error:
       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1691:14:
         1690|         zipAttrsWith (
         1691|           n: values:
             |              ^
         1692|           let

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

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1188:17:
         1187|         mapAttrs (
         1188|           name: value:
             |                 ^
         1189|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1189:85:
         1188|           name: value:
         1189|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1190|         );

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-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/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1118:7:
         1117|     // {
         1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1119|       inherit (res.defsFinal') highestPrio;

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

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

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1193:7:
         1192|     mergedValue =
         1193|       if isDefined then
             |       ^
         1194|         if type.merge ? v2 then

       … while evaluating the attribute 'values'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1186:9:
         1185|       {
         1186|         values = defsSorted;
             |         ^
         1187|         inherit (defsFiltered) highestPrio;

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1180:11:
         1179|           # Avoid sorting if we don't have to.
         1180|           if any (def: def.value._type or "" == "order") defsFiltered.values then
             |           ^
         1181|             sortProperties defsFiltered.values

       … while calling the 'any' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1180:14:
         1179|           # Avoid sorting if we don't have to.
         1180|           if any (def: def.value._type or "" == "order") defsFiltered.values then
             |              ^
         1181|             sortProperties defsFiltered.values

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

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

       … while calling the 'concatMap' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1160:26:
         1159|         # Process mkMerge and mkIf properties.
         1160|         defsNormalized = concatMap (
             |                          ^
         1161|           m:

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1161:11:
         1160|         defsNormalized = concatMap (
         1161|           m:
             |           ^
         1162|           map (

       … while calling the 'map' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1162:11:
         1161|           m:
         1162|           map (
             |           ^
         1163|             value:

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

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1171:80:
         1170|               }
         1171|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1172|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1311:5:
         1310|   dischargeProperties =
         1311|     def:
             |     ^
         1312|     if def._type or "" == "merge" then

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1312:5:
         1311|     def:
         1312|     if def._type or "" == "merge" then
             |     ^
         1313|       concatMap dischargeProperties def.contents

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

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

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

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/asserts.nix:197:5:
          196|     in
          197|     if failedAssertions != [ ] then
             |     ^
          198|       throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"

       … while calling the 'map' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/asserts.nix:195:26:
          194|     let
          195|       failedAssertions = map (x: x.message) (filter (x: !x.assertion) assertions);
             |                          ^
          196|     in

       … while calling the 'filter' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/asserts.nix:195:46:
          194|     let
          195|       failedAssertions = map (x: x.message) (filter (x: !x.assertion) assertions);
             |                                              ^
          196|     in

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

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1188:17:
         1187|         mapAttrs (
         1188|           name: value:
             |                 ^
         1189|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1189:85:
         1188|           name: value:
         1189|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1190|         );

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-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/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1118:7:
         1117|     // {
         1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1119|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `assertions':

       (10 duplicate frames omitted)

       … while evaluating definitions from `/nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/nixos/modules/system/boot/systemd.nix':

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1171:80:
         1170|               }
         1171|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1172|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1311:5:
         1310|   dischargeProperties =
         1311|     def:
             |     ^
         1312|     if def._type or "" == "merge" then

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1312:5:
         1311|     def:
         1312|     if def._type or "" == "merge" then
             |     ^
         1313|       concatMap dischargeProperties def.contents

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

       … while calling the 'concatLists' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/nixos/modules/system/boot/systemd.nix:523:18:
          522|
          523|     assertions = concatLists (
             |                  ^
          524|       mapAttrsToList (

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/nixos/modules/system/boot/systemd.nix:524:7:
          523|     assertions = concatLists (
          524|       mapAttrsToList (
             |       ^
          525|         name: service:

       … while calling 'mapAttrsToList'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1085:23:
         1084|   */
         1085|   mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);
             |                       ^
         1086|

       … while calling the 'attrValues' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1085:30:
         1084|   */
         1085|   mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);
             |                              ^
         1086|

       … while calling the 'mapAttrs' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1085:42:
         1084|   */
         1085|   mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);
             |                                          ^
         1086|

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/nixos/modules/system/boot/systemd.nix:540:9:
          539|           ])
          540|       ) cfg.services
             |         ^
          541|     );

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1188:17:
         1187|         mapAttrs (
         1188|           name: value:
             |                 ^
         1189|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1189:85:
         1188|           name: value:
         1189|           if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value
             |                                                                                     ^
         1190|         );

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-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/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1118:7:
         1117|     // {
         1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1119|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `systemd.services':

       (10 duplicate frames omitted)

       … while evaluating definitions from `/nix/store/zlxam875qb3jb3yhln4ampl5wx556ny5-source/modules/minecraft-servers.nix':

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1171:80:
         1170|               }
         1171|           ) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                ^
         1172|         ) defs;

       … while calling 'dischargeProperties'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1311:5:
         1310|   dischargeProperties =
         1311|     def:
             |     ^
         1312|     if def._type or "" == "merge" then

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1316:31:
         1315|       if isBool def.condition then
         1316|         if def.condition then dischargeProperties def.content else [ ]
             |                               ^
         1317|       else

       … while calling 'dischargeProperties'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1311:5:
         1310|   dischargeProperties =
         1311|     def:
             |     ^
         1312|     if def._type or "" == "merge" then

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1312:5:
         1311|     def:
         1312|     if def._type or "" == "merge" then
             |     ^
         1313|       concatMap dischargeProperties def.contents

       … while evaluating the attribute 'content'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1471:23:
         1470|     _type = "if";
         1471|     inherit condition content;
             |                       ^
         1472|   };

       … from call site
         at /nix/store/zlxam875qb3jb3yhln4ampl5wx556ny5-source/modules/minecraft-servers.nix:668:26:
          667|
          668|       systemd.services = mapAttrs' (
             |                          ^
          669|         name: conf:

       … while calling 'mapAttrs''
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1051:18:
         1050|   */
         1051|   mapAttrs' = f: set: listToAttrs (mapAttrsToList f set);
             |                  ^
         1052|

       … while calling the 'listToAttrs' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1051:23:
         1050|   */
         1051|   mapAttrs' = f: set: listToAttrs (mapAttrsToList f set);
             |                       ^
         1052|

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1051:36:
         1050|   */
         1051|   mapAttrs' = f: set: listToAttrs (mapAttrsToList f set);
             |                                    ^
         1052|

       … while calling 'mapAttrsToList'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1085:23:
         1084|   */
         1085|   mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);
             |                       ^
         1086|

       … while calling the 'attrValues' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1085:30:
         1084|   */
         1085|   mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);
             |                              ^
         1086|

       … while calling the 'mapAttrs' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1085:42:
         1084|   */
         1085|   mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);
             |                                          ^
         1086|

       … from call site
         at /nix/store/zlxam875qb3jb3yhln4ampl5wx556ny5-source/modules/minecraft-servers.nix:568:17:
          567|     let
          568|       servers = filterAttrs (_: cfg: cfg.enable) cfg.servers;
             |                 ^
          569|     in

       … while calling 'filterAttrs'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:663:23:
          662|   */
          663|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                       ^
          664|

       … while calling the 'removeAttrs' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:663:28:
          662|   */
          663|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                            ^
          664|

       … while calling the 'filter' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:663:45:
          662|   */
          663|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                             ^
          664|

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:663:53:
          662|   */
          663|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                                     ^
          664|

       … in the argument of the not operator
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:663:60:
          662|   */
          663|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                                            ^
          664|

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:663:60:
          662|   */
          663|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                                            ^
          664|

       … while calling anonymous lambda
         at /nix/store/zlxam875qb3jb3yhln4ampl5wx556ny5-source/modules/minecraft-servers.nix:568:33:
          567|     let
          568|       servers = filterAttrs (_: cfg: cfg.enable) cfg.servers;
             |                                 ^
          569|     in

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:663:70:
          662|   */
          663|   filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));
             |                                                                      ^
          664|

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/types.nix:879:22:
          878|                 value = mapAttrs (
          879|                   n: v:
             |                      ^
          880|                   if lazy then

       … while evaluating the attribute 'optionalValue.value'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:1256:41:
         1255|
         1256|     optionalValue = if isDefined then { value = mergedValue; } else { };
             |                                         ^
         1257|   };

       … while evaluating the attribute 'value'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/types.nix:1307:17:
         1306|                 headError = checkDefsForError check loc defs;
         1307|                 value = configuration.config;
             |                 ^
         1308|                 valueMeta = { inherit configuration; };

       … while evaluating the attribute 'config'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:361:9:
          360|         options = checked options;
          361|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          362|         _module = checked (config._module);

       … while calling the 'seq' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:361:18:
          360|         options = checked options;
          361|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          362|         _module = checked (config._module);

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:297:9:
          296|       checkUnmatched =
          297|         if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [ ] then
             |         ^
          298|           let

       … in the left operand of the AND (&&) operator
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:297:72:
          296|       checkUnmatched =
          297|         if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [ ] then
             |                                                                        ^
          298|           let

       … in the left operand of the AND (&&) operator
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:297:33:
          296|       checkUnmatched =
          297|         if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [ ] then
             |                                 ^
          298|           let

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:288:9:
          287|         in
          288|         if declaredConfig._module.freeformType == null then
             |         ^
          289|           declaredConfig

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:275:28:
          274|           # For definitions that have an associated option
          275|           declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;
             |                            ^
          276|

       … while calling 'mapAttrsRecursiveCond'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1183:14:
         1182|   mapAttrsRecursiveCond =
         1183|     cond: f: set:
             |              ^
         1184|     let

       … while calling the 'mapAttrs' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/attrsets.nix:1192:5:
         1191|     in
         1192|     recurse [ ] set;
             |     ^
         1193|

       … while evaluating the attribute 'matchedOptions'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:891:15:
          890|     {
          891|       inherit matchedOptions;
             |               ^
          892|

       … while calling the 'mapAttrs' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:881:24:
          880|
          881|       matchedOptions = mapAttrs (n: v: v.matchedOptions) resultsByName;
             |                        ^
          882|

       … while calling the 'mapAttrs' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:829:23:
          828|
          829|       resultsByName = mapAttrs (
             |                       ^
          830|         name: decls:

       … while calling the 'zipAttrsWith' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:745:21:
          744|       # an attrset 'name' => list of submodules that declare ‘name’.
          745|       declsByName = zipAttrsWith (n: v: v) (
             |                     ^
          746|         map (

       … while calling the 'map' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:746:9:
          745|       declsByName = zipAttrsWith (n: v: v) (
          746|         map (
             |         ^
          747|           module:

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:267:37:
          266|
          267|       merged = mergeModules prefix (reverseList (doCollect { }).modules);
             |                                     ^
          268|

       … while calling 'reverseList'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/lists.nix:1105:5:
         1104|   reverseList =
         1105|     xs:
             |     ^
         1106|     let

       … while calling the 'genList' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/lists.nix:1109:5:
         1108|     in
         1109|     genList (n: elemAt xs (l - n - 1)) l;
             |     ^
         1110|

       … while evaluating the second argument passed to builtins.genList

       … while calling the 'length' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/lists.nix:1107:11:
         1106|     let
         1107|       l = length xs;
             |           ^
         1108|     in

       … while evaluating the attribute 'modules'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:550:7:
          549|     modulesPath: initialModules: args: {
          550|       modules = filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
             |       ^
          551|       graph = toGraph modulesPath (collectStructuredModules unknownModule "" initialModules args);

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:550:17:
          549|     modulesPath: initialModules: args: {
          550|       modules = filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
             |                 ^
          551|       graph = toGraph modulesPath (collectStructuredModules unknownModule "" initialModules args);

       … while calling 'filterModules'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:525:9:
          524|         modulesPath:
          525|         { disabled, modules }:
             |         ^
          526|         let

       … while calling the 'map' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:529:9:
          528|         in
          529|         map (attrs: attrs.module) (genericClosure {
             |         ^
          530|           startSet = keyFilter modules;

       … while calling the 'genericClosure' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:529:36:
          528|         in
          529|         map (attrs: attrs.module) (genericClosure {
             |                                    ^
          530|           startSet = keyFilter modules;

       … while calling the 'filter' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:530:22:
          529|         map (attrs: attrs.module) (genericClosure {
          530|           startSet = keyFilter modules;
             |                      ^
          531|           operator = attrs: keyFilter attrs.modules;

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:527:31:
          526|         let
          527|           keyFilter = filter (attrs: !isDisabled modulesPath disabled attrs);
             |                               ^
          528|         in

       … in the argument of the not operator
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:527:39:
          526|         let
          527|           keyFilter = filter (attrs: !isDisabled modulesPath disabled attrs);
             |                                       ^
          528|         in

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:527:39:
          526|         let
          527|           keyFilter = filter (attrs: !isDisabled modulesPath disabled attrs);
             |                                       ^
          528|         in

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:456:9:
          455|         in
          456|         structuredModule: elem structuredModule.key disabledKeys;
             |         ^
          457|

       … while calling the 'elem' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:456:27:
          455|         in
          456|         structuredModule: elem structuredModule.key disabledKeys;
             |                           ^
          457|

       … while calling the 'concatMap' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:454:26:
          453|
          454|           disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabledList;
             |                          ^
          455|         in

       … while calling the 'concatLists' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:486:24:
          485|           collectResults = modules: {
          486|             disabled = concatLists (catAttrs "disabled" modules);
             |                        ^
          487|             inherit modules;

       … while evaluating the attribute 'disabled'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:486:13:
          485|           collectResults = modules: {
          486|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          487|             inherit modules;

       … while calling the 'concatLists' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:486:24:
          485|           collectResults = modules: {
          486|             disabled = concatLists (catAttrs "disabled" modules);
             |                        ^
          487|             inherit modules;

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:504:19:
          503|                 (
          504|                   if module.disabledModules != [ ] then
             |                   ^
          505|                     [

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:495:24:
          494|             let
          495|               module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                        ^
          496|               collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling anonymous lambda
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:427:11:
          426|         else
          427|           m: m;
             |           ^
          428|

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:495:37:
          494|             let
          495|               module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
             |                                     ^
          496|               collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while calling 'loadModule'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:379:42:
          378|       loadModule =
          379|         args: fallbackFile: fallbackKey: m:
             |                                          ^
          380|         if isFunction m then

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:408:11:
          407|         else
          408|           unifyModuleSyntax (toString m) (toString m) (
             |           ^
          409|             applyModuleArgsIfFunction (toString m) (import m) args

       … while calling 'unifyModuleSyntax'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:591:16:
          590|   unifyModuleSyntax =
          591|     file: key: m:
             |                ^
          592|     let

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:612:5:
          611|     in
          612|     if m ? config || m ? options then
             |     ^
          613|       let

       … in the left operand of the OR (||) operator
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:612:19:
          611|     in
          612|     if m ? config || m ? options then
             |                   ^
          613|       let

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:409:13:
          408|           unifyModuleSyntax (toString m) (toString m) (
          409|             applyModuleArgsIfFunction (toString m) (import m) args
             |             ^
          410|           );

       … while calling 'applyModuleArgsIfFunction'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:661:13:
          660|   applyModuleArgsIfFunction =
          661|     key: f: args@{ config, ... }: if isFunction f then applyModuleArgs key f args else f;
             |             ^
          662|

       … while evaluating a branch condition
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:661:35:
          660|   applyModuleArgsIfFunction =
          661|     key: f: args@{ config, ... }: if isFunction f then applyModuleArgs key f args else f;
             |                                   ^
          662|

       … from call site
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:661:38:
          660|   applyModuleArgsIfFunction =
          661|     key: f: args@{ config, ... }: if isFunction f then applyModuleArgs key f args else f;
             |                                      ^
          662|

       … while calling 'isFunction'
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/trivial.nix:1057:16:
         1056|   */
         1057|   isFunction = f: builtins.isFunction f || (f ? __functor && isFunction (f.__functor f));
             |                ^
         1058|

       … in the left operand of the OR (||) operator
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/trivial.nix:1057:41:
         1056|   */
         1057|   isFunction = f: builtins.isFunction f || (f ? __functor && isFunction (f.__functor f));
             |                                         ^
         1058|

       … while calling the 'isFunction' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/trivial.nix:1057:19:
         1056|   */
         1057|   isFunction = f: builtins.isFunction f || (f ? __functor && isFunction (f.__functor f));
             |                   ^
         1058|

       … while calling the 'import' builtin
         at /nix/store/0lc6kbmhkqk8vmgflpn2n1d1qb3vl2f5-source/lib/modules.nix:409:53:
          408|           unifyModuleSyntax (toString m) (toString m) (
          409|             applyModuleArgsIfFunction (toString m) (import m) args
             |                                                     ^
          410|           );

       error: access to absolute path '/run' is forbidden in pure evaluation mode (use '--impure' to override)
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '.#nixosConfigurations."Unbreaking".config.system.build.toplevel' --no-link --show-trace' returned non-zero exit status 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions