try to fix for proxmox by disableing grub
This commit is contained in:
parent
8f12835e33
commit
924395d64e
@ -11,6 +11,7 @@ in
|
||||
|
||||
config = mkIf config.smayzy.server.enable {
|
||||
smayzy = {
|
||||
grub.disable = true;
|
||||
base = true;
|
||||
power = "desktop";
|
||||
stylix.enable = true;
|
||||
|
||||
@ -3,20 +3,30 @@
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.smayzy.grub.disable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "if don't need a cool bootloader";
|
||||
};
|
||||
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";
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (!config.smayzy.grub.disable) {
|
||||
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;
|
||||
};
|
||||
boot.loader.grub.efiInstallAsRemovable = config.smayzy.grub-on-lap.enable;
|
||||
boot.loader.efi.canTouchEfiVariables = !config.smayzy.grub-on-lap.enable;
|
||||
})
|
||||
|
||||
(lib.mkIf config.smayzy.grub.disable {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user