From 4ca27063e2c03a2c7323d611520e94fd8c20c16b Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Tue, 16 Jan 2024 20:51:24 +0800 Subject: [PATCH] fix: https://github.com/ryan4yin/nix-config/issues/43 - /dev/xxx is not a valid luks device --- hosts/idols/ai/hardware-configuration.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hosts/idols/ai/hardware-configuration.nix b/hosts/idols/ai/hardware-configuration.nix index a208d2f7..bdf7d362 100644 --- a/hosts/idols/ai/hardware-configuration.nix +++ b/hosts/idols/ai/hardware-configuration.nix @@ -45,7 +45,9 @@ boot.initrd = { # unlocked luks devices via a keyfile or prompt a passphrase. luks.devices."crypted-nixos" = { - device = "/dev/nvme0n1p2"; + # NOTE: DO NOT use device name here(like /dev/sda, /dev/nvme0n1p2, etc), use the 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. # if not specified, you will be prompted for a passphrase instead. #keyFile = "/root-part.key";