move grub and nvidia modules to hardware

This commit is contained in:
smayzy committed 2025-07-07 19:24:11 +02:00
1 parent 1653ab916b
commit bfc760d7c4
4 files changed
+2 -2

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
with lib;
{
options.smayzy.grub-on-lap.enable = mkOption {
type = types.bool;
default = false;
description = "make grub works on this piece of shit laptop that can't boot normally";
};
config = {
boot.loader.systemd-boot.enable = false;
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.device = "nodev";
boot.loader.grub.efiInstallAsRemovable = mkIf config.smayzy.grub-on-lap.enable true;
boot.loader.efi.canTouchEfiVariables = mkIf (!config.smayzy.grub-on-lap.enable) true;
};
}