Hi. I am currently instaling NixOS to virtual machine through SSH, but it still gives me this:
error: syntax error, unexpected end of file, expecting ';'
at /mnt/etc/nixos/configuration.nix:116:2:
115| system.stateVersion = "22.05"; # Did you read the comment?
116| }
| ^
117|
(use '--show-trace' to show detailed location information)
I have done everything right, but it still throws that same error. Can someone help me?
Still, you certainly overlooked an error. You may want to add the nix LSP to your editor to help you spot syntax issues like this. Otherwise, you could try to run a formatter on it, they may be able to tell you something is wrong when you look at the indentation going bad.
Another option (assuming you cannot share the full file here) is to drop in a semicolon somewhere up from the bottom and notice how the reported error moves. This should help you hone in on where and what the actual error is.
Similar to adding a semicolon is to remove chunks of code until nixos-rebuild dry-build succeeds, and then add them back until it fails and you identify the offending code.