-
-
Save nasirhm/7ecf9f0ce241f85001b262cdd60bcdfc to your computer and use it in GitHub Desktop.
nixos install (boot + btrfs root + LUKS setup)
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
mkfs.vfat -n BOOT /dev/sda3 | |
mkfs.btrfs -L root /dev/sda1 | |
cryptsetup luksFormat /dev/sda1 | |
# Enter the Password. | |
cryptsetup luksOpen /dev/sda1 enc-pv | |
# After Opening the Disk, Open Gparted and Format /dev/sda1 to btrfs for the btrfs logic block. | |
# Add a label to /dev/sda1 too as nixos | |
mount -t btrfs /dev/disk/by-label/nixos /mnt/ | |
btrfs subvolume create /mnt/nixos | |
umount /mnt/ | |
mount -t btrfs -o subvol=nixos /dev/disk/by-label/nixos /mnt/ | |
btrfs subvolume create /mnt/var | |
btrfs subvolume create /mnt/home | |
btrfs subvolume create /mnt/tmp | |
mkdir /mnt/boot | |
mount /dev/disk/by-label/nixos /mnt/boot/ | |
nixos-generate-config --root /mnt/ | |
# edit the config; see | |
# https://nixos.org/nixos/manual/index.html#sec-installation | |
vim /mnt/etc/nixos/configuration.nix | |
nixos-install | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment