nix-config/modules/nix/hardware/grub.nix
smayzy 092579af98
All checks were successful
nix flake show / show-flake (push) Successful in 27s
format with nixfmt to nixpkgs standarts
2025-07-24 19:19:46 +02:00

23 lines
587 B
Nix

{ config, lib, ... }:
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;
};
}