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.
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.
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