Syntax error please help

error:
… while evaluating the attribute ‘config’

     at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:

      321|         options = checked options;
      322|         config = checked (removeAttrs config [ "_module" ]);
         |         ^
      323|         _module = checked (config._module);

   … while calling the 'seq' builtin

     at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:

      321|         options = checked options;
      322|         config = checked (removeAttrs config [ "_module" ]);
         |                  ^
      323|         _module = checked (config._module);

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

   error: syntax error, unexpected '='

   at /etc/nixos/configuration.nix:138:22:

      137|   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html.
      138|  system.stateVersion = "24.05"; # Did you read the comment?
         |                      ^
      139| }

building Nix…
error:
… while evaluating the attribute ‘config’

     at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:

      321|         options = checked options;
      322|         config = checked (removeAttrs config [ "_module" ]);
         |         ^
      323|         _module = checked (config._module);

   … while calling the 'seq' builtin

     at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:

      321|         options = checked options;
      322|         config = checked (removeAttrs config [ "_module" ]);
         |                  ^
      323|         _module = checked (config._module);

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

   error: syntax error, unexpected '='

   at /etc/nixos/configuration.nix:138:22:

      137|   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html.
      138|  system.stateVersion = "24.05"; # Did you read the comment?
         |                      ^
      139| }

building the system configuration…
error:
… while evaluating the attribute ‘config.system.build.toplevel’

     at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:

      321|         options = checked options;
      322|         config = checked (removeAttrs config [ "_module" ]);
         |         ^
      323|         _module = checked (config._module);

   … while calling the 'seq' builtin

     at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:

      321|         options = checked options;
      322|         config = checked (removeAttrs config [ "_module" ]);
         |                  ^
      323|         _module = checked (config._module);

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

   error: syntax error, unexpected '='

   at /etc/nixos/configuration.nix:138:22:

      137|   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html.
      138|  system.stateVersion = "24.05"; # Did you read the comment?
         |                      ^
      139| }

You very likely missed a semicolon in the lines before.

1 Like

I accidentally deleted a ‘[’ in the packages thanks for the help!