mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-09 04:10:05 +00:00
37 lines
621 B
Nix
37 lines
621 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
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|