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
|
../../modules/nix/virt.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
users = {
|
users = {
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.efiInstallAsRemovable = true;
|
smayzy.grub-on-lap = true;
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
|||||||
@ -1,7 +1,22 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.loader.systemd-boot.enable = false;
|
options.smayzy.grub-on-lap.enable = mkOption {
|
||||||
boot.loader.grub.enable = true;
|
type = types.bool;
|
||||||
boot.loader.grub.efiSupport = true;
|
default = false;
|
||||||
boot.loader.grub.device = "nodev";
|
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