I need help about Nixos

Hey, ı’m new to NixOS.

I edited “/etc/nixos/configuration.nix” file to add “code” (aka VS Code) but it gave me this error.

error:
… while evaluating the attribute ‘config
at /nix/store/85vdli920k31b6qy3335s364g4kzwm5k-nixos-25.11.2403.76701a179d3a/nixos/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/85vdli920k31b6qy3335s364g4kzwm5k-nixos-25.11.2403.76701a179d3a/nixos/lib/modules.nix:361:18**: 
      360|         options = checked options; 
      361|         config = checked (removeAttrs config \[ "\_module" \]); 
         |                  **^** 
      362|         \_module = checked (config.\_module); 

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

   **error:** syntax error, unexpected ID, expecting '.' or '=' 
   **at /etc/nixos/configuration.nix:133:3**: 
      132|   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html ). 
      133|   system.stateVersion = "25.11"; # Did you read the comment? 
         |   **^** 
      134| 

Command ‘nix-build ‘<nixpkgs/nixos>’ --attr config.system.build.nixos-rebuild --no-out-link’ returned non-zero exit
status 1.”

How can ı solve this?

You wrote invalid nix syntax in you configuration.nix. Without seeing it, I can’t tell you exactly what you did wrong, though.

Also, please use triple backticks (```) on their own line before and after copied text like that, so it renders it verbatim.

Very likely a missing semicolon around lines 125 to 132.

But as later says, Without knowing what you actually did, we can’t say for sure.

I tried to download VS Code by adding it under packages however ı added the name “Code” (which wasn’t even VS Code at all) under “];” I think that was the reason this error popped up, because ı had deleted the “code” from there and write it under where it should be written (under the packages) and the problem was solved. Thank you for saving time for my question though.

I managed to solve it, thank you for saving time to answer my question.

Hello!

Feel free to mark the thread as resolved by clicking on the checkbox “solution” under the appropriate comment. It will be helpful for everybody.

Good luck with NixOS !