Get the format config:
cd /tmp
curl https://raw.githubusercontent.com/hatch01/flake/master/disk.nix -o disk.nixGet the disk id we want to format
lsblkThe output should look like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 1,8T 0 disk
edit the device value according to your disk.
vi /tmp/disk.nixset the disk encryption password
echo -n "password" > /tmp/secret.keyRun partitionment:
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disk.nixInstall
su root
mkdir -p /mnt/etc
cd /mnt/etc
git clone https://github.com/hatch01/flake nixos
cd nixosmaybe edit the disk name in flake .nix
You need to generate keys for secure boot:
sudo sbctl create-keysthen install
nixos-install --flake .#tulipe