dotfiles/common/boot/grub.nix
2025-03-07 17:34:08 -06:00

28 lines
487 B
Nix

{
custom_config_key,
config,
lib,
...
}:
let
cfg = config."${custom_config_key}".boot.grub;
in
with lib;
{
options."${custom_config_key}".boot.grub = {
enable = mkEnableOption "Grub bootloader";
device = mkOption {
type = types.str;
default = "/dev/sda";
description = ''
The device to install GRUB on.
'';
};
};
config = mkIf cfg.enable {
boot.loader.grub = {
enable = true;
device = cfg.device;
};
};
}