From 73a9b4d16c1a6b40ebd5790731d1b5ce42d41859 Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Tue, 9 Jul 2024 00:24:39 +0200 Subject: [PATCH] Fix bootloader configurations --- hosts/frues-pc/default.nix | 2 ++ hosts/frues-port/default.nix | 3 +++ modules/core/bootloader.nix | 11 ++++++----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hosts/frues-pc/default.nix b/hosts/frues-pc/default.nix index 313a5c7..de21b49 100644 --- a/hosts/frues-pc/default.nix +++ b/hosts/frues-pc/default.nix @@ -10,6 +10,8 @@ hardware.ckb-next.enable = true; + boot.loader.efi.efiSysMountPoint = "/boot/efi"; + boot.initrd.kernelModules = ["amdgpu"]; services.xserver.videoDrivers = ["amdgpu"]; hardware.graphics.extraPackages = with pkgs; [ diff --git a/hosts/frues-port/default.nix b/hosts/frues-port/default.nix index 03783c4..3f6a8a1 100644 --- a/hosts/frues-port/default.nix +++ b/hosts/frues-port/default.nix @@ -47,6 +47,9 @@ powerManagement.cpuFreqGovernor = "performance"; + boot.loader.efi.canTouchEfiVariables = false; # For the next option + boot.loader.grub.efiInstallAsRemovable = true; + boot = { kernelModules = ["acpi_call"]; extraModulePackages = with config.boot.kernelPackages; diff --git a/modules/core/bootloader.nix b/modules/core/bootloader.nix index 8a1bfd6..9619060 100644 --- a/modules/core/bootloader.nix +++ b/modules/core/bootloader.nix @@ -1,14 +1,15 @@ -{pkgs, ...}: { +{ + pkgs, + lib, + ... +}: { boot.loader = { - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot/efi"; - }; grub = { efiSupport = true; device = "nodev"; useOSProber = true; }; + efi.canTouchEfiVariables = lib.mkDefault true; }; boot.kernelPackages = pkgs.linuxPackages_latest; }