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 { 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;

View File

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