try to make grub settings a custom option
This commit is contained in:
parent
f149f12bf7
commit
95f71801e0
@ -9,8 +9,6 @@
|
||||
../../modules/nix/virt.nix
|
||||
];
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users = {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
smayzy.grub-on-lap = true;
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
|
||||
@ -1,7 +1,22 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.device = "nodev";
|
||||
}
|
||||
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";
|
||||
|
||||
boot.loader.grub.efiInstallAsRemovable = mkIf config.smayzy.grub-on-lap.enable true;
|
||||
boot.loader.efi.canTouchEfiVariables = mkIf (!config.smayzy.grub-on-lap.enable) true;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user