Hello everyone,
I am about to install nixos on my laptop (surface book 2) which I would like to dual-boot with an existing installation of windows.
I have previously successfully installed archlinux on the laptop, but I have since deleted it as a preparation for the nixos installation. Still, I wanted to make sure that I do not accidentally brick my windows installation, which is why it would be great to get a second pair of eyes on this.
I would like to use full disk encryption and I have previously used lvm on luks to accomplish this.
I also use a script to set everything up so that I can make incremental changes. The script is on github:
https://github.com/busti/iso-surfacebook_2/blob/52a6d73388460fd74a19e82cbe9e75680663e7d8/entry.sh
Running this results in the following partition table:
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p1 259:1 0 260M 0 part WIN-EFI
├─nvme0n1p2 259:2 0 128M 0 part WIN-Reserved
├─nvme0n1p3 259:3 0 107.6G 0 part WIN-OS
├─nvme0n1p4 259:4 0 1.9G 0 part WIN-Recovery
├─nvme0n1p5 259:9 0 2G 0 part /mnt/boot NIX-BOOT
└─nvme0n1p6 259:10 0 126.6G 0 part Cryptroot
└─cryptlvm 254:0 0 126.5G 0 crypt
├─vg0-root 254:1 0 100G 0 lvm /mnt Root
└─vg0-swap 254:2 0 8G 0 lvm [SWAP] Swap
I then clone the following config repo into /etc/nixos
:
I have mapped all partitions by their label and currently I have this boot config:
boot = {
loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
enable = true;
version = 2;
device = "nodev";
useOSProber = true;
efiSupport = true;
enableCryptodisk = true;
};
};
initrd.luks.devices = {
root = {
device = "/dev/disk/by-label/cryptroot";
preLVM = true;
};
};
};
Is this good? Or is there anything obvious I have missed?