From 3d836c9d726d6cf6f813b10662583efad98895dc Mon Sep 17 00:00:00 2001 From: r-vdp Date: Tue, 23 Dec 2025 12:17:33 +0200 Subject: [PATCH] nixos/facter: enable grub uefi support based on facter report See https://github.com/nix-community/nixos-facter-modules/commit/fb9eea6bb0ac1ce07bcf7498fcff6e5f653b6091 Co-authored-by: Christian Friedow --- nixos/modules/hardware/facter/boot.nix | 16 ++++++++++++++++ nixos/modules/hardware/facter/default.nix | 1 + 2 files changed, 17 insertions(+) create mode 100644 nixos/modules/hardware/facter/boot.nix diff --git a/nixos/modules/hardware/facter/boot.nix b/nixos/modules/hardware/facter/boot.nix new file mode 100644 index 000000000000..2fa3c3573c82 --- /dev/null +++ b/nixos/modules/hardware/facter/boot.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + ... +}: + +{ + options.hardware.facter.detected.uefi.supported = lib.mkEnableOption "the facter uefi module" // { + default = config.hardware.facter.report.uefi.supported or false; + defaultText = "hardware dependent"; + }; + + config.boot.loader.grub.efiSupport = lib.mkIf config.hardware.facter.detected.uefi.supported ( + lib.mkDefault true + ); +} diff --git a/nixos/modules/hardware/facter/default.nix b/nixos/modules/hardware/facter/default.nix index e1376769a333..71720a0e0647 100644 --- a/nixos/modules/hardware/facter/default.nix +++ b/nixos/modules/hardware/facter/default.nix @@ -5,6 +5,7 @@ }: { imports = [ + ./boot.nix ./bluetooth.nix ./camera ./debug.nix