24.05 install fails "swapon failed"

G’day,

I’m new to Nix and NixOS, but really impressed so far.

Using 23.11 the installer was great, but I’ve tried 24.05 on a couple of machines now. The installation fails “swapon failed to active swap”. This is repeatable across multiple machines, so I don’t think it’s machine dependent. Not sure the best way to file this issue.

Thanks,
Dave

Another thing I noticed is that on install NixOS creates /etc/nixos/configuration.nix, but this configuration.nix has an error that nix then complains about

building Nix…
building the system configuration…
trace: warning: The option services.xserver.xkbVariant' defined in /etc/nixos/configuration.nix’ has been renamed to services.xserver.xkb.variant'. trace: warning: The option services.xserver.layout’ defined in /etc/nixos/configuration.nix' has been renamed to services.xserver.xkb.layout’.

I had the same problem when I tried to install NixOS around three days ago. I had to install it via terminal commands instead of the graphical installer, only then the installation worked.

1 Like

I’m having the same issue on multiple systems. They all use btrfs if that’s causing the issue, and they all worked fine before 24.05

Same 2 issues on multiple systems 23.05 / 24.05

you have any link where i can follow on the steps

You can just select the install option and then close the graphical installer that opens up in a live CD session. Inside the same session you can open up a terminal emulator and follow the steps here:
https://nixos.org/manual/nixos/stable/#sec-installation-manual