fix: failed to boot - replace device name by uuid

This commit is contained in:
Ryan Yin
2024-01-28 09:56:40 +08:00
parent 63d686ad3a
commit 0504d0503b
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -46,7 +46,7 @@
boot.initrd = {
# unlocked luks devices via a keyfile or prompt a passphrase.
luks.devices."crypted-nixos" = {
# NOTE: DO NOT use device name here(like /dev/sda, /dev/nvme0n1p2, etc), use the UUID instead.
# NOTE: DO NOT use device name here(like /dev/sda, /dev/nvme0n1p2, etc), use UUID instead.
# https://github.com/ryan4yin/nix-config/issues/43
device = "/dev/disk/by-uuid/a21ca82a-9ee6-4e5c-9d3f-a93e84e4e0f4";
# the keyfile(or device partition) that should be used as the decryption key for the encrypted device.
@@ -119,7 +119,7 @@
};
fileSystems."/boot" = {
device = "/dev/nvme0n1p1";
device = "/dev/disk/by-uuid/90FB-9F88";
fsType = "vfat";
};