NixOS/system/modules/boot_loader.nix

29 lines
544 B
Nix
Raw Permalink Normal View History

2024-06-12 18:09:56 +07:00
{ config, lib, ... }:
let
grub = config.profile.grub;
in
lib.mkMerge [
{
boot.loader = lib.mkIf grub.enable {
efi = {
efiSysMountPoint = "/boot";
canTouchEfiVariables = true;
};
grub = {
enable = true;
efiSupport = true;
useOSProber = true;
device = "nodev"; # used nodev because of efi support
};
2024-06-12 09:54:11 +07:00
};
2024-06-12 18:09:56 +07:00
}
{
boot.loader = lib.mkIf (!grub.enable) {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
};
2024-06-12 09:54:11 +07:00
};
2024-06-12 18:09:56 +07:00
}
]