Skip to content

Unhelpful error/Parser error during installation. #11764

Open
@jamen

Description

Platform

  • Linux: NixOS
  • macOS
  • WSL

Additional information

This was my first experience trying to install NixOS (with the nixos-minimal-24.05.5993.cd3e8833d706-x86_64-linux.iso image.)

I was going for something pretty simple, using the default config, with a few things added for ZFS. I was following the Manual installation guide and the ZFS article on the NixOS Wiki.

These are the configs I ended up with:

As you can see, I had accidently duplicated some of the settings between them, which was fine, until these lines:

  swapDevices = [ "/dev/disk/by-label/swap" ];
  swapDevices =
    [ { device = "/dev/disk/by-uuid/b999f1fd-5d14-4a02-af87-6c83da6dbab2"; }
    ];

This gave me an unhelpful error when it came time to nixos-install:

[root@nixos:~]# nixos-install
copying channel...
building the configuration in /mnt/etc/nixos/configuration.nix...
fatal flex scanner internal error--end of buffer missed

The issue was resolved by properly defining swapDevices (or just deferring to the hardware-configuration.nix definitions, which wasn't clear to me at the time).

I figured its still worth reporting this issue because the config errors were more helpful up until that, and it doesn't seem intended because I found no information about this error (as it relates to Nix). It took me about half an hour to figure out.

** Priorities **

Add 👍 to issues you find important.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions