diff --git a/devices/nas/default.nix b/devices/nas/default.nix index 138e0a20..5d8e5f96 100644 --- a/devices/nas/default.nix +++ b/devices/nas/default.nix @@ -10,10 +10,9 @@ inputs: { mount = { - vfat."/dev/disk/by-uuid/13BC-F0C9" = "/boot/efi"; + vfat."/dev/disk/by-uuid/13BC-F0C9" = "/boot"; btrfs = { - "/dev/disk/by-uuid/0e184f3b-af6c-4f5d-926a-2559f2dc3063"."/boot" = "/boot"; "/dev/mapper/nix"."/nix" = "/nix"; "/dev/mapper/root3" = { diff --git a/devices/pc/default.nix b/devices/pc/default.nix index b20653d5..f42b2e67 100644 --- a/devices/pc/default.nix +++ b/devices/pc/default.nix @@ -10,12 +10,8 @@ inputs: { mount = { - vfat."/dev/disk/by-uuid/E58F-416A" = "/boot/efi"; - btrfs = - { - "/dev/disk/by-uuid/066be4fd-8617-4fe1-9654-c133c2996d33"."/" = "/boot"; - "/dev/mapper/root1" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; }; - }; + vfat."/dev/disk/by-uuid/7A60-4232" = "/boot"; + btrfs."/dev/mapper/root1" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; }; }; decrypt.auto = { @@ -169,7 +165,7 @@ inputs: menuentry 'Advanced UEFI Firmware Settings' { insmod fat insmod chain - chainloader EFI/Boot/Bootx64.efi + chainloader @bootRoot@/EFI/Boot/Bootx64.efi } ''; }; diff --git a/devices/pcarm/default.nix b/devices/pcarm/default.nix index 75c615f6..a212f8b2 100644 --- a/devices/pcarm/default.nix +++ b/devices/pcarm/default.nix @@ -10,9 +10,10 @@ inputs: { 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" = - { "/nix/rootfs/current" = "/"; "/nix" = "/nix"; "/nix/boot" = "/boot"; }; + { "/nix/rootfs/current" = "/"; "/nix" = "/nix"; }; }; rollingRootfs = {}; }; diff --git a/devices/pcvm/default.nix b/devices/pcvm/default.nix index d124d282..319a8971 100644 --- a/devices/pcvm/default.nix +++ b/devices/pcvm/default.nix @@ -10,12 +10,9 @@ inputs: { mount = { - vfat."/dev/disk/by-uuid/AE90-1DD1" = "/boot/efi"; - btrfs = - { - "/dev/disk/by-uuid/5a043ec5-7b47-4b0d-ad89-8c3ce5650fcd"."/" = "/boot"; - "/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; }; - }; + # TODO: reparition + vfat."/dev/disk/by-uuid/AE90-1DD1" = "/boot"; + btrfs."/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; }; }; decrypt.auto."/dev/disk/by-uuid/a9e4a508-3f0b-492e-b932-e2019be28615" = { mapper = "root"; ssd = true; }; rollingRootfs = {}; diff --git a/devices/pi3b/default.nix b/devices/pi3b/default.nix index b2766ab2..b126a990 100644 --- a/devices/pi3b/default.nix +++ b/devices/pi3b/default.nix @@ -10,9 +10,10 @@ inputs: { 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" = - { "/nix/rootfs/current" = "/"; "/nix" = "/nix"; "/nix/boot" = "/boot"; }; + { "/nix/rootfs/current" = "/"; "/nix" = "/nix"; }; }; swap = [ "/nix/swap/swap" ]; rollingRootfs = {}; diff --git a/devices/surface/default.nix b/devices/surface/default.nix index d47f85d4..6941a1d8 100644 --- a/devices/surface/default.nix +++ b/devices/surface/default.nix @@ -11,12 +11,8 @@ inputs: { mount = { - vfat."/dev/disk/by-uuid/A44C-6DB4" = "/boot/efi"; - btrfs = - { - "/dev/disk/by-uuid/10c2ee85-b5bf-41ff-9901-d36d2edd8a69"."/boot" = "/boot"; - "/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; }; - }; + vfat."/dev/disk/by-uuid/A44C-6DB4" = "/boot"; + btrfs."/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; }; }; decrypt.auto."/dev/disk/by-uuid/124ce605-93b4-454f-924b-fe741f39e065" = { mapper = "root"; ssd = true; }; swap = [ "/nix/swap/swap" ]; diff --git a/devices/xmupc1/default.nix b/devices/xmupc1/default.nix index fb389ef6..6c3771a2 100644 --- a/devices/xmupc1/default.nix +++ b/devices/xmupc1/default.nix @@ -10,10 +10,11 @@ inputs: { mount = { - vfat."/dev/disk/by-uuid/467C-02E3" = "/boot/efi"; + # TODO: reparition + vfat."/dev/disk/by-uuid/467C-02E3" = "/boot"; 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" = { "/nix/rootfs" = "/nix/rootfs"; diff --git a/devices/xmupc2/default.nix b/devices/xmupc2/default.nix index f6d7e590..835d33ca 100644 --- a/devices/xmupc2/default.nix +++ b/devices/xmupc2/default.nix @@ -10,11 +10,11 @@ inputs: { mount = { - vfat."/dev/disk/by-uuid/23CA-F4C4" = "/boot/efi"; + vfat."/dev/disk/by-uuid/23CA-F4C4" = "/boot"; btrfs = { "/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" ]; diff --git a/modules/system/grub.nix b/modules/system/grub.nix index 90e44249..ed7f9df2 100644 --- a/modules/system/grub.nix +++ b/modules/system/grub.nix @@ -23,11 +23,7 @@ inputs: efiSupport = builtins.elem grub.installDevice [ "efi" "efiRemovable" ]; efiInstallAsRemovable = grub.installDevice == "efiRemovable"; }; - efi = - { - canTouchEfiVariables = grub.installDevice == "efi"; - efiSysMountPoint = inputs.lib.mkIf (builtins.elem grub.installDevice [ "efi" "efiRemovable" ]) "/boot/efi"; - }; + efi.canTouchEfiVariables = grub.installDevice == "efi"; }; } # extra grub entries @@ -36,7 +32,7 @@ inputs: { memtest86.enable = inputs.lib.mkIf (inputs.config.nixos.system.nixpkgs.arch == "x86_64") true; 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 [ (builtins.map @@ -72,7 +68,7 @@ inputs: menuentry "UEFI Shell" { insmod fat insmod chain - chainloader /shell.efi + chainloader @bootRoot@/shell.efi } '' ) diff --git a/todo.md b/todo.md index fcddd00a..70ddcc96 100644 --- a/todo.md +++ b/todo.md @@ -3,3 +3,4 @@ * 挑选一个好看的主题 * 尝试一些别的计算软件 * 解决 vscode 中的英语语法检查插件,尝试 valentjn.vscode-ltex +* 调整 xmupc1 xmupc2 启动分区