Browse Source

Add VM setup notes

master
Sven Slootweg 1 year ago
parent
commit
e70151102d
2 changed files with 35 additions and 1 deletions
  1. +1
    -1
      .gitignore
  2. +34
    -0
      notes/nixos-setup.txt

+ 1
- 1
.gitignore View File

@@ -1 +1 @@
notes
private

+ 34
- 0
notes/nixos-setup.txt View File

@@ -0,0 +1,34 @@
fdisk /dev/sda
o
n p <enter> <enter> +1G
# boot partition
n p <enter> <enter> <enter>
# LVM partition
a 1
# set bootable
w

# Boot partition
mkfs.ext4 -L boot /dev/sda1

# LVM partition
pvcreate /dev/sda2
vgcreate vg_main /dev/sda2
lvcreate -L 2GB -n lv_swap vg_main
lvcreate -l 100%FREE -n lv_root vg_main

mkswap -L swap /dev/vg_main/lv_swap
swapon /dev/vg_main/lv_swap

mkfs.ext4 -L nixos /dev/vg_main/lv_root

mount /dev/vg_main/lv_root /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

# NixOS installation
nixos-generate-config --root /mnt
wget -O /mnt/etc/nixos/configuration.nix https://git.cryto.net/joepie91/morph-rc/raw/master/data/dummy-configuration.nix
# NOTE: Potentially update configuration.nix at this point if the primary disk is not /dev/sda!

nixos-install

Loading…
Cancel
Save