Created
August 12, 2021 05:59
-
-
Save tvalladon/87a6823da033b168c5eae6704bb412b4 to your computer and use it in GitHub Desktop.
This file contains 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
1 export $dev=/dev/nvme0n1 | |
2 export dev=/dev/nvme0n1 | |
3 gdisk $dev | |
5 cryptsetup luksFormat "$dev"p3 | |
6 cryptsetup open "$dev"p3 enc | |
7 mkfs.vfat -n boot "$dev"p1 | |
8 mkswap "$dev"p2 | |
9 swapon "$dev"p2 | |
11 mkfs.btrfs -L root /dev/mapper/enc | |
13 mount -t btrfs /dev/mapper/enc /mnt/ | |
14 btrfs subvol create /mnt/nixos | |
15 umount /mnt | |
20 mount -t btrfs -o subvol=nixos,compress=zstd,noatime /dev/mapper/enc /mnt | |
21 btrfs subvolume create /mnt/home | |
22 btrfs subvolume create /mnt/tmp | |
23 mkdir /mnt/boot | |
24 mount "$dev"p1 /mnt/boot | |
25 nixos-generate-config --root /mnt | |
27 vim /mnt/etc/nixos/configuration.nix | |
28 nixos-install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment