diff --git a/.gitignore b/.gitignore index bfa6551..3e18ebf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -notes +private diff --git a/notes/nixos-setup.txt b/notes/nixos-setup.txt new file mode 100644 index 0000000..98f434a --- /dev/null +++ b/notes/nixos-setup.txt @@ -0,0 +1,34 @@ +fdisk /dev/sda + o + n p +1G + # boot partition + n p + # 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