try to fix for proxmox by disableing grub
All checks were successful
nixos config pipeline / show-flake (push) Successful in 19s
nixos config pipeline / deploy (push) Successful in 45s

This commit is contained in:
smayzy 2025-09-10 19:30:36 +02:00
parent 8f12835e33
commit 924395d64e
2 changed files with 19 additions and 8 deletions

View File

@ -11,6 +11,7 @@ in
config = mkIf config.smayzy.server.enable {
smayzy = {
grub.disable = true;
base = true;
power = "desktop";
stylix.enable = true;

View File

@ -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 = {
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;
})
];
}