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 {
|
config = mkIf config.smayzy.server.enable {
|
||||||
smayzy = {
|
smayzy = {
|
||||||
|
grub.disable = true;
|
||||||
base = true;
|
base = true;
|
||||||
power = "desktop";
|
power = "desktop";
|
||||||
stylix.enable = true;
|
stylix.enable = true;
|
||||||
|
|||||||
@ -3,20 +3,30 @@
|
|||||||
with lib;
|
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 {
|
options.smayzy.grub-on-lap.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "make grub works on this piece of shit laptop that can't boot normally";
|
description = "make grub works on this piece of shit laptop that can't boot normally";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkMerge [
|
||||||
boot.loader.systemd-boot.enable = false;
|
(lib.mkIf (!config.smayzy.grub.disable) {
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.systemd-boot.enable = false;
|
||||||
boot.loader.grub.efiSupport = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "nodev";
|
boot.loader.grub.efiSupport = true;
|
||||||
|
boot.loader.grub.device = "nodev";
|
||||||
|
|
||||||
boot.loader.grub.efiInstallAsRemovable = mkIf config.smayzy.grub-on-lap.enable true;
|
boot.loader.grub.efiInstallAsRemovable = config.smayzy.grub-on-lap.enable;
|
||||||
boot.loader.efi.canTouchEfiVariables = mkIf (!config.smayzy.grub-on-lap.enable) true;
|
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