Browse Source

Add VM setup notes

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

@ -1 +1 @@
1
notes
1
private

+ 34 - 0
notes/nixos-setup.txt

@ -0,0 +1,34 @@
1
fdisk /dev/sda
2
	o
3
	n p <enter> <enter> +1G
4
		# boot partition
5
	n p <enter> <enter> <enter>
6
		# LVM partition
7
	a 1
8
		# set bootable
9
	w
10
11
# Boot partition
12
mkfs.ext4 -L boot /dev/sda1
13
14
# LVM partition
15
pvcreate /dev/sda2
16
vgcreate vg_main /dev/sda2
17
lvcreate -L 2GB -n lv_swap vg_main
18
lvcreate -l 100%FREE -n lv_root vg_main
19
20
mkswap -L swap /dev/vg_main/lv_swap
21
swapon /dev/vg_main/lv_swap
22
23
mkfs.ext4 -L nixos /dev/vg_main/lv_root
24
25
mount /dev/vg_main/lv_root /mnt
26
mkdir /mnt/boot
27
mount /dev/sda1 /mnt/boot
28
29
# NixOS installation
30
nixos-generate-config --root /mnt
31
wget -O /mnt/etc/nixos/configuration.nix https://git.cryto.net/joepie91/morph-rc/raw/master/data/dummy-configuration.nix
32
# NOTE: Potentially update configuration.nix at this point if the primary disk is not /dev/sda!
33
34
nixos-install