Hi there,
I’m using unstable.
I have a first device /dev/sda
with LUKS on LVM installed on /dev/sda2
, containing all /boot
, /home
, /nix
:
UUID of sda2 is : /dev/disk/by-uuid/f61551a2-96dc-4f50-8083-2b9a1edabef8;
UUID of root is : /dev/disk/by-uuid/e6e192ac-73e5-4a4c-976c-89ad69df553a
boot.initrd.luks.devices = [ {
name = "enc-pv";
preLVM = true;
device = "/dev/disk/by-uuid/f61551a2-96dc-4f50-8083-2b9a1edabef8";
allowDiscards = true;
}
];
Corresponding to this into hardware-configuration.nix
:
fileSystems."/" =
{ device = "/dev/disk/by-uuid/e6e192ac-73e5-4a4c-976c-89ad69df553a";
fsType = "ext4";
};
Everything works fine at this stage, boot and starting nix is ok.
Now, i want to extend my VPS storage by adding a second volume, /dev/sdb
, also encrypted using LUKS.
Is there a way to config this into hardware-config.nix
, without automount, and manually asking passphrase when i try to mount this vol ?
How i define this in hardware-config.nix
? I try to add something like that, but that don’t work at startup :
UUID returned by blkid /dev/sdb
is 4de8a74e-d45c-4d1f-8b9f-d38bc91f7bba, but perhaps this is the other UUID after mounting crypted vol ?
fileSystems."/data" =
{ device = "/dev/disk/by-uuid/4de8a74e-d45c-4d1f-8b9f-d38bc91f7bba";
fsType = "ext4";
};
Here the list of uuid :