Errors for configuration.nix

I tried to install virtualbox. I’ve added few lines, strarted the errors and remove these new lines.

Unfortuneteley, The errors messages has continued.

I’m very new to nixos scripts. So, I need help to correct the error and I’m totally confused.

Edit this configuration file to define what should be installed on

your system. Help is available in the configuration.nix(5) man page

and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, … }:

{

Bootloader.

boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

{

Use latest kernel.

boot.kernelPackages = pkgs.linuxPackages_latest;
}

{
networking.hostName = “nixos”; # Define your hostname.

networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.

}

{

Configure network proxy if necessary

networking.proxy.default = “http://user:password@proxy:port/”;

networking.proxy.noProxy = “127.0.0.1,localhost,internal.domain”;

Enable networking

networking.networkmanager.enable = true;

Enable flatpak

services.flatpak.enable = true;

Set your time zone.

time.timeZone = “Europe/Athens”;

Select internationalisation properties.

i18n.defaultLocale = “en_US.UTF-8”;

i18n.extraLocaleSettings = {
LC_ADDRESS = “el_GR.UTF-8”;
LC_IDENTIFICATION = “el_GR.UTF-8”;
LC_MEASUREMENT = “el_GR.UTF-8”;
LC_MONETARY = “el_GR.UTF-8”;
LC_NAME = “el_GR.UTF-8”;
LC_NUMERIC = “el_GR.UTF-8”;
LC_PAPER = “el_GR.UTF-8”;
LC_TELEPHONE = “el_GR.UTF-8”;
LC_TIME = “el_GR.UTF-8”;
};

Enable the X11 windowing system.

You can disable this if you’re only using the Wayland session.

services.xserver.enable = true;

Enable the KDE Plasma Desktop Environment.

services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;

Configure keymap in X11

services.xserver.xkb = {
layout = “us”;
variant = “”;
};

Enable CUPS to print documents.

services.printing.enable = true;

Enable sound with pipewire.

services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;

If you want to use JACK applications, uncomment this

#jack.enable = true;

# use the example session manager (no others are packaged yet so this is enabled by default,

no need to redefine it in your config for now)

#media-session.enable = true;

};

Enable touchpad support (enabled default in most desktopManager).

services.xserver.libinput.enable = true;

Define a user account. Don’t forget to set a password with ‘passwd’.

users.users.nixos = {
isNormalUser = true;
description = “Yiannis Thomaidis”;
extraGroups = [ “networkmanager” “wheel” ];
packages = with pkgs; [
kdePackages.kate

thunderbird

];
};

Install firefox.

programs.firefox.enable = true;

Allow unfree packages

nixpkgs.config.allowUnfree = true;

{ config, pkgs, … }

List packages installed in system profile. To search, run:

$ nix search wget

environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
neovim
#libreoffice-fresh
qpdfview
hunspellDicts.el-gr
hunspellDicts.el_GR
hunspellDicts.en_US-large
hyphenDicts.en-us
#texlivePackages.hyphen-greek
nerd-fonts.ubuntu-sans
nerd-fonts.dejavu-sans-mono
font-schumacher-misc
font-adobe-100dpi
google-fonts
noto-fonts
corefonts
font-adobe-utopia-75dpi
get-google-fonts
ferrum
floorp-bin
mc
gpm
pcloud
aisleriot
quadrapassel
sgt-puzzles
krusader
ungoogled-chromium
unrar
#chromium
vivaldi
#grub2
#kdePackages.konqueror
#telegram-desktop
gnome-software
gparted
#kdePackages.filelight
#freeoffice
onlyoffice-desktopeditors
vlc
vlc-bittorrent
hplip
hplipWithPlugin
inconsolata-lgc
gentium-plus
gentium-book
gentium-book
symbola
noto-fonts-lgc-plus
noto-fonts-lgc-plus
alegreya-sans
alegreya
corefonts
ffmpeg_7-full
microsoft-edge
jre25_minimal
#libreoffice-qt-fresh
libreoffice-qt-still
hyphen
kdePackages.kdeconnect-kde

hyphen-utf8

marktext

cinnamon

cinnamon-session

cinnamon-desktop

cinnamon-settings-daemon

nemo-with-extensions

nemo-preview

];

environment.systemPackages = [

pkgs.gnome-software

];

Some programs need SUID wrappers, can be configured further or are

started in user sessions.

programs.mtr.enable = true;

programs.gnupg.agent = {

enable = true;

enableSSHSupport = true;

};

List services that you want to enable:

Enable the OpenSSH daemon.

services.openssh.enable = true;

Open ports in the firewall.

networking.firewall.allowedTCPPorts = [ … ];

networking.firewall.allowedUDPPorts = [ … ];

Or disable the firewall altogether.

networking.firewall.enable = false;

This value determines the NixOS release from which the default

settings for stateful data, like file locations and database versions

on your system were taken. It‘s perfectly fine and recommended to leave

this value at the release version of the first install of this system.

Before changing this value read the documentation for this option

(e.g. man configuration.nix or on NixOS Search ).

system.stateVersion = “25.11”; # Did you read the comment?

#}

And the errors in terminal (after the command nixos-rebuild switch to check for errors):

[nixos@nixos:~]$ sudo nixos-rebuild switch
[sudo] password for nixos:
error:
… while evaluating the attribute ‘config
at /nix/store/1pxjimwxwbiqaqbnpidv1yzi75b7civa-nixos-25.11/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/1pxjimwxwbiqaqbnpidv1yzi75b7civa-nixos-25.11/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 end of file, expecting INHERIT 
   **at /etc/nixos/configuration.nix:222:1**: 
      221| 
      222| 
         | **^** 

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

Please use triple-backticks for code blocks.

1 Like
  1. Is virtual box strictly necessary? QEMU can can do a lot more than and is Linux’s premier VM project.
  2. This is a problem with the syntax of your code, it’s saying it’s expecting an inherit.
1 Like