From 924395d64e36900d1ef0a66a51fd48f8ecf05177 Mon Sep 17 00:00:00 2001 From: smayzy Date: Wed, 10 Sep 2025 19:30:36 +0200 Subject: [PATCH] try to fix for proxmox by disableing grub --- modules/nix/groups/server.nix | 1 + modules/nix/hardware/grub.nix | 26 ++++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/modules/nix/groups/server.nix b/modules/nix/groups/server.nix index f58ac8b..d70db24 100644 --- a/modules/nix/groups/server.nix +++ b/modules/nix/groups/server.nix @@ -11,6 +11,7 @@ in config = mkIf config.smayzy.server.enable { smayzy = { + grub.disable = true; base = true; power = "desktop"; stylix.enable = true; diff --git a/modules/nix/hardware/grub.nix b/modules/nix/hardware/grub.nix index 3bc5ff8..64d4c2d 100644 --- a/modules/nix/hardware/grub.nix +++ b/modules/nix/hardware/grub.nix @@ -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; + }) + ]; }