2024-09-06 17:43:30 +02:00
|
|
|
{
|
|
|
|
lib,
|
2024-12-03 18:38:19 +01:00
|
|
|
namespace,
|
2024-09-06 17:43:30 +02:00
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: with lib; with lib.${namespace};
|
|
|
|
let
|
|
|
|
cfg = config.${namespace}.common.grub;
|
|
|
|
in {
|
|
|
|
options.${namespace}.common.grub = { enable = mkEnableOption "grub"; };
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-09-22 22:57:47 +02:00
|
|
|
boot.loader.systemd-boot.enable = false;
|
|
|
|
|
2024-09-06 17:43:30 +02:00
|
|
|
boot.loader.grub = {
|
|
|
|
enable = true;
|
|
|
|
devices = [ "nodev" ];
|
|
|
|
efiInstallAsRemovable = true;
|
|
|
|
efiSupport = true;
|
|
|
|
|
|
|
|
extraEntries = ''
|
|
|
|
menuentry "Reboot" {
|
|
|
|
reboot
|
|
|
|
}
|
|
|
|
menuentry "Poweroff" {
|
|
|
|
halt
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
2024-09-06 17:53:13 +02:00
|
|
|
};
|
2024-09-06 17:43:30 +02:00
|
|
|
}
|