mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-22 21:18:44 +08:00
fix grub
This commit is contained in:
parent
44eb056f49
commit
7edb72b51f
@ -10,10 +10,9 @@ inputs:
|
|||||||
{
|
{
|
||||||
mount =
|
mount =
|
||||||
{
|
{
|
||||||
vfat."/dev/disk/by-uuid/13BC-F0C9" = "/boot/efi";
|
vfat."/dev/disk/by-uuid/13BC-F0C9" = "/boot";
|
||||||
btrfs =
|
btrfs =
|
||||||
{
|
{
|
||||||
"/dev/disk/by-uuid/0e184f3b-af6c-4f5d-926a-2559f2dc3063"."/boot" = "/boot";
|
|
||||||
"/dev/mapper/nix"."/nix" = "/nix";
|
"/dev/mapper/nix"."/nix" = "/nix";
|
||||||
"/dev/mapper/root3" =
|
"/dev/mapper/root3" =
|
||||||
{
|
{
|
||||||
|
@ -10,12 +10,8 @@ inputs:
|
|||||||
{
|
{
|
||||||
mount =
|
mount =
|
||||||
{
|
{
|
||||||
vfat."/dev/disk/by-uuid/E58F-416A" = "/boot/efi";
|
vfat."/dev/disk/by-uuid/7A60-4232" = "/boot";
|
||||||
btrfs =
|
btrfs."/dev/mapper/root1" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
|
||||||
{
|
|
||||||
"/dev/disk/by-uuid/066be4fd-8617-4fe1-9654-c133c2996d33"."/" = "/boot";
|
|
||||||
"/dev/mapper/root1" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
decrypt.auto =
|
decrypt.auto =
|
||||||
{
|
{
|
||||||
@ -169,7 +165,7 @@ inputs:
|
|||||||
menuentry 'Advanced UEFI Firmware Settings' {
|
menuentry 'Advanced UEFI Firmware Settings' {
|
||||||
insmod fat
|
insmod fat
|
||||||
insmod chain
|
insmod chain
|
||||||
chainloader EFI/Boot/Bootx64.efi
|
chainloader @bootRoot@/EFI/Boot/Bootx64.efi
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -10,9 +10,10 @@ inputs:
|
|||||||
{
|
{
|
||||||
mount =
|
mount =
|
||||||
{
|
{
|
||||||
vfat."/dev/disk/by-uuid/CE84-E0D8" = "/boot/efi";
|
# TODO: reparition
|
||||||
|
vfat."/dev/disk/by-uuid/CE84-E0D8" = "/boot";
|
||||||
btrfs."/dev/disk/by-uuid/61f51d93-d3e5-4028-a903-332fafbfd365" =
|
btrfs."/dev/disk/by-uuid/61f51d93-d3e5-4028-a903-332fafbfd365" =
|
||||||
{ "/nix/rootfs/current" = "/"; "/nix" = "/nix"; "/nix/boot" = "/boot"; };
|
{ "/nix/rootfs/current" = "/"; "/nix" = "/nix"; };
|
||||||
};
|
};
|
||||||
rollingRootfs = {};
|
rollingRootfs = {};
|
||||||
};
|
};
|
||||||
|
@ -10,12 +10,9 @@ inputs:
|
|||||||
{
|
{
|
||||||
mount =
|
mount =
|
||||||
{
|
{
|
||||||
vfat."/dev/disk/by-uuid/AE90-1DD1" = "/boot/efi";
|
# TODO: reparition
|
||||||
btrfs =
|
vfat."/dev/disk/by-uuid/AE90-1DD1" = "/boot";
|
||||||
{
|
btrfs."/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
|
||||||
"/dev/disk/by-uuid/5a043ec5-7b47-4b0d-ad89-8c3ce5650fcd"."/" = "/boot";
|
|
||||||
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
decrypt.auto."/dev/disk/by-uuid/a9e4a508-3f0b-492e-b932-e2019be28615" = { mapper = "root"; ssd = true; };
|
decrypt.auto."/dev/disk/by-uuid/a9e4a508-3f0b-492e-b932-e2019be28615" = { mapper = "root"; ssd = true; };
|
||||||
rollingRootfs = {};
|
rollingRootfs = {};
|
||||||
|
@ -10,9 +10,10 @@ inputs:
|
|||||||
{
|
{
|
||||||
mount =
|
mount =
|
||||||
{
|
{
|
||||||
vfat."/dev/disk/by-uuid/ABC6-6B3E" = "/boot/efi";
|
# TODO: reparition
|
||||||
|
vfat."/dev/disk/by-uuid/ABC6-6B3E" = "/boot";
|
||||||
btrfs."/dev/disk/by-uuid/c459c6c0-23a6-4ef2-945a-0bfafa9a45b6" =
|
btrfs."/dev/disk/by-uuid/c459c6c0-23a6-4ef2-945a-0bfafa9a45b6" =
|
||||||
{ "/nix/rootfs/current" = "/"; "/nix" = "/nix"; "/nix/boot" = "/boot"; };
|
{ "/nix/rootfs/current" = "/"; "/nix" = "/nix"; };
|
||||||
};
|
};
|
||||||
swap = [ "/nix/swap/swap" ];
|
swap = [ "/nix/swap/swap" ];
|
||||||
rollingRootfs = {};
|
rollingRootfs = {};
|
||||||
|
@ -11,12 +11,8 @@ inputs:
|
|||||||
{
|
{
|
||||||
mount =
|
mount =
|
||||||
{
|
{
|
||||||
vfat."/dev/disk/by-uuid/A44C-6DB4" = "/boot/efi";
|
vfat."/dev/disk/by-uuid/A44C-6DB4" = "/boot";
|
||||||
btrfs =
|
btrfs."/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
|
||||||
{
|
|
||||||
"/dev/disk/by-uuid/10c2ee85-b5bf-41ff-9901-d36d2edd8a69"."/boot" = "/boot";
|
|
||||||
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
decrypt.auto."/dev/disk/by-uuid/124ce605-93b4-454f-924b-fe741f39e065" = { mapper = "root"; ssd = true; };
|
decrypt.auto."/dev/disk/by-uuid/124ce605-93b4-454f-924b-fe741f39e065" = { mapper = "root"; ssd = true; };
|
||||||
swap = [ "/nix/swap/swap" ];
|
swap = [ "/nix/swap/swap" ];
|
||||||
|
@ -10,10 +10,11 @@ inputs:
|
|||||||
{
|
{
|
||||||
mount =
|
mount =
|
||||||
{
|
{
|
||||||
vfat."/dev/disk/by-uuid/467C-02E3" = "/boot/efi";
|
# TODO: reparition
|
||||||
|
vfat."/dev/disk/by-uuid/467C-02E3" = "/boot";
|
||||||
btrfs =
|
btrfs =
|
||||||
{
|
{
|
||||||
"/dev/disk/by-uuid/2f9060bc-09b5-4348-ad0f-3a43a91d158b" = { "/nix" = "/nix"; "/nix/boot" = "/boot"; };
|
"/dev/disk/by-uuid/2f9060bc-09b5-4348-ad0f-3a43a91d158b"."/nix" = "/nix";
|
||||||
"/dev/disk/by-uuid/a04a1fb0-e4ed-4c91-9846-2f9e716f6e12" =
|
"/dev/disk/by-uuid/a04a1fb0-e4ed-4c91-9846-2f9e716f6e12" =
|
||||||
{
|
{
|
||||||
"/nix/rootfs" = "/nix/rootfs";
|
"/nix/rootfs" = "/nix/rootfs";
|
||||||
|
@ -10,11 +10,11 @@ inputs:
|
|||||||
{
|
{
|
||||||
mount =
|
mount =
|
||||||
{
|
{
|
||||||
vfat."/dev/disk/by-uuid/23CA-F4C4" = "/boot/efi";
|
vfat."/dev/disk/by-uuid/23CA-F4C4" = "/boot";
|
||||||
btrfs =
|
btrfs =
|
||||||
{
|
{
|
||||||
"/dev/disk/by-uuid/d187e03c-a2b6-455b-931a-8d35b529edac" =
|
"/dev/disk/by-uuid/d187e03c-a2b6-455b-931a-8d35b529edac" =
|
||||||
{ "/nix/rootfs/current" = "/"; "/nix" = "/nix"; "/nix/boot" = "/boot"; };
|
{ "/nix/rootfs/current" = "/"; "/nix" = "/nix"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
swap = [ "/nix/swap/swap" ];
|
swap = [ "/nix/swap/swap" ];
|
||||||
|
@ -23,11 +23,7 @@ inputs:
|
|||||||
efiSupport = builtins.elem grub.installDevice [ "efi" "efiRemovable" ];
|
efiSupport = builtins.elem grub.installDevice [ "efi" "efiRemovable" ];
|
||||||
efiInstallAsRemovable = grub.installDevice == "efiRemovable";
|
efiInstallAsRemovable = grub.installDevice == "efiRemovable";
|
||||||
};
|
};
|
||||||
efi =
|
efi.canTouchEfiVariables = grub.installDevice == "efi";
|
||||||
{
|
|
||||||
canTouchEfiVariables = grub.installDevice == "efi";
|
|
||||||
efiSysMountPoint = inputs.lib.mkIf (builtins.elem grub.installDevice [ "efi" "efiRemovable" ]) "/boot/efi";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# extra grub entries
|
# extra grub entries
|
||||||
@ -36,7 +32,7 @@ inputs:
|
|||||||
{
|
{
|
||||||
memtest86.enable = inputs.lib.mkIf (inputs.config.nixos.system.nixpkgs.arch == "x86_64") true;
|
memtest86.enable = inputs.lib.mkIf (inputs.config.nixos.system.nixpkgs.arch == "x86_64") true;
|
||||||
extraFiles = inputs.lib.mkIf (builtins.elem grub.installDevice [ "efi" "efiRemovable" ])
|
extraFiles = inputs.lib.mkIf (builtins.elem grub.installDevice [ "efi" "efiRemovable" ])
|
||||||
{ "shell.efi" = "${inputs.pkgs.edk2-uefi-shell}/shell.efi"; };
|
{ "shell.efi" = "${inputs.pkgs.genericPackages.edk2-uefi-shell}/shell.efi"; };
|
||||||
extraEntries = inputs.lib.mkMerge (builtins.concatLists
|
extraEntries = inputs.lib.mkMerge (builtins.concatLists
|
||||||
[
|
[
|
||||||
(builtins.map
|
(builtins.map
|
||||||
@ -72,7 +68,7 @@ inputs:
|
|||||||
menuentry "UEFI Shell" {
|
menuentry "UEFI Shell" {
|
||||||
insmod fat
|
insmod fat
|
||||||
insmod chain
|
insmod chain
|
||||||
chainloader /shell.efi
|
chainloader @bootRoot@/shell.efi
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user