Skip to content

Instantly share code, notes, and snippets.

@Gowee
Created August 3, 2022 08:38
Show Gist options
  • Save Gowee/309a4950698c380d06ac65a31d1e4f5d to your computer and use it in GitHub Desktop.
Save Gowee/309a4950698c380d06ac65a31d1e4f5d to your computer and use it in GitHub Desktop.
#!/bin/sh
parted /dev/vda -- mklabel gpt
parted /dev/vda -- mkpart esp 1MiB 100MiB
parted /dev/vda -- mkpart primary 100MiB 100%
parted /dev/vda -- set 1 boot on
mkfs.ext4 -L nixos /dev/vda2 # btrfs not working?
mkfs.vfat -F32 -n boot /dev/vda1
mkdir -p /mnt
mount /dev/vda2 /mnt
mkdir -p /mnt/boot
mount /dev/vda1 /mnt/boot
nixos-generate-config --root /mnt
# adapt configuration.nix
nixos-install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment