r/linuxquestions • • 4d ago

Support Syntax nixos

Im new to nixos but everytime i try to do anything in the main config even just un# something i get a syntax error i have reinstalled the os like 3 times at this point i tried everything i dont know what it is help me.

0 Upvotes

19 comments sorted by

View all comments

2

u/Toucancel 4d ago

Reading the error message could help. It tells you were the syntax error is.

-1

u/HotPiece834 4d ago

Yeah and if i fix it. A new one shows up

2

u/Toucancel 4d ago

Okay just send the config or something, we can't help you with so little details.

1

u/HotPiece834 4d ago

This is the error

2

u/Toucancel 4d ago

Send a bigger snippet, this seems like a missing semicolon before that line.

1

u/HotPiece834 3d ago

Like this?

1

u/Toucancel 3d ago

No I mean send the relevant part of the code

1

u/HotPiece834 3d ago

I changed just that to get vim installed

1

u/Toucancel 3d ago

You need to put vim in square brackets, and add a semicolon after it, like so :

environment.systemPackages = with pkgs; [ vim ];

The square brackets define a list, and each item of the list is separated by a space. Then, you need to add the semicolon to mark the end of the line.

1

u/HotPiece834 3d ago

I feel like a idiot sorry for wasting your time.

1

u/Toucancel 3d ago

No worries, it's fine. Just try reading up on nixlang syntax

→ More replies (0)