Skip to content

Instantly share code, notes, and snippets.

@samdroid-apps
Forked from alcol80/btrfs-nixos-install.sh
Last active February 3, 2023 13:16
Show Gist options
  • Save samdroid-apps/3723d30953af5e1d68d4ad5327e624c0 to your computer and use it in GitHub Desktop.
Save samdroid-apps/3723d30953af5e1d68d4ad5327e624c0 to your computer and use it in GitHub Desktop.
nixos install (boot + btrfs)
mkfs.vfat -n BOOT /dev/sda1
mkfs.btrfs -L root /dev/sda2
mount -t btrfs /dev/sda2 /mnt/
btrfs subvolume create /mnt/nixos
umount /mnt/
mount -t btrfs -o subvol=nixos /dev/sda2 /mnt/
btrfs subvolume create /mnt/var
btrfs subvolume create /mnt/home
btrfs subvolume create /mnt/tmp
mkdir /mnt/boot
mount /dev/sda1 /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
Copy link

ghost commented Nov 15, 2021

@samdroid-apps How do you know how to install NixOS with btrfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment