mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-09 20:30:05 +00:00
35 lines
619 B
Nix
35 lines
619 B
Nix
{
|
|
lib,
|
|
self,
|
|
config,
|
|
...
|
|
}: let
|
|
inherit (lib) mkEnableOption mkIf;
|
|
inherit (self) namespace;
|
|
|
|
cfg = config.${namespace}.system.grub;
|
|
in {
|
|
options.${namespace}.system.grub = {
|
|
enable = mkEnableOption "the grub bootloader.";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
boot.loader.systemd-boot.enable = false;
|
|
|
|
boot.loader.grub = {
|
|
enable = true;
|
|
devices = ["nodev"];
|
|
efiInstallAsRemovable = true;
|
|
efiSupport = true;
|
|
|
|
extraEntries = ''
|
|
menuentry "Reboot" {
|
|
reboot
|
|
}
|
|
menuentry "Poweroff" {
|
|
halt
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|