Aha! Thanks, Cole! Now I’m getting a new boot loader error:
/boot/efi
does not exist
My new config is even simpler than before:
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
boot.loader = {
systemd-boot.enable = true;
};
networking.hostName = "jbb-dell";
networking.wireless.enable = true;
networking.useDHCP = false;
networking.interfaces.enp2s0.useDHCP = true;
networking.interfaces.wlp1s0.useDHCP = true;
system.stateVersion = "20.09";
}
The new error I get is this:
installing the boot loader...
setting up /etc...
Failed to check file system type of "/boot/efi": No such file or directory
Traceback (most recent call last):
File "/nix/store/42bzcc2l9m0mnkx984y17kbjhmbzi92l-systemd-boot-builder.py", line 258, in <module>
main()
File "/nix/store/42bzcc2l9m0mnkx984y17kbjhmbzi92l-systemd-boot-builder.py", line 197, in main
subprocess.check_call(["/nix/store/3ri1jzc32mdlywwwxpj4lzzc0b1w9awf-systemd-246.4/bin/bootctl", "--path=/boot/efi", "install"])
File "/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/3ri1jzc32mdlywwwxpj4lzzc0b1w9awf-systemd-246.4/bin/bootctl', '--path=/boot/efi', 'install']' returned non-zero exit status 1.
I found another post here regarding this same problem, for which the solution involved changing the order of some mkdir
and mount
operations. But I’m following the NixOS manual verbatim. (The commands I ran this time are unchanged from my first post.)
Should I not use GRUB?
The following passage appears in the manual:
UEFI systems
You must set the option boot.loader.systemd-boot.enable to true. nixos-generate-config should do this automatically for new configurations when booted in UEFI mode.
That, plus what you’re saying, suggests I shouldn’t use GRUB, doesn’t it?
How would I know whether I booted the installer using GRUB?
You wrote
This is assuming that you’re on a UEFI system, and booted via UEFI currently (so that
efibootmgr
can create entries in the system loader).
I got no errors that mention efibootmgr
; maybe that means UEFI is in fact the way I got here?