Created
May 6, 2019 22:27
-
-
Save dmjio/daf17ac7166db4a7ab011ae0cf9712ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parted /dev/nvme0n1 -- mklabel gpt | |
parted /dev/nvme0n1 -- mkpart primary 512MiB -8GiB | |
parted /dev/nvme0n1 -- mkpart primary linux-swap -8GiB 100% | |
parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 512MiB | |
parted /dev/nvme0n1 -- set 3 boot on | |
cryptsetup luksFormat /dev/nvme0n1p1 | |
cryptsetup luksOpen /dev/nvme0n1p1 cryptroot | |
mkfs.ext4 -L nixos /dev/mapper/cryptroot | |
mkswap -L swap /dev/nvme0n1p2 | |
mkfs.fat -F 32 -n boot /dev/nvme0n1p3 | |
mount /dev/disk/by-label/nixos /mnt | |
mkdir -p /mnt/boot | |
mount /dev/disk/by-label/boot /mnt/boot | |
swapon /dev/nvme0n1p2 | |
nixos-generate-config --root /mnt | |
nixos-install | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment