Add rudimentary installation instructions
This commit is contained in:
parent
5cd9d526df
commit
f661dc8bf2
1 changed files with 51 additions and 0 deletions
51
README.adoc
51
README.adoc
|
@ -15,3 +15,54 @@ cards.
|
|||
|
||||
* The nix files shoud be formatted using nixfmt:
|
||||
** `nixfmt -c $(git ls-files *.nix)`
|
||||
|
||||
|
||||
== Setup
|
||||
|
||||
# Boot nixos live cd
|
||||
# Connect network
|
||||
# sudo passwd root
|
||||
# From other machine: `ssh -A root@nixos`
|
||||
# Partitioning:
|
||||
|
||||
parted /dev/nvme0n1
|
||||
mklabel gpt
|
||||
unit mib
|
||||
|
||||
# Create EFI Partition
|
||||
mkpart boot fat32 1 750
|
||||
set 1 esp on
|
||||
|
||||
# Main Crypto LVM
|
||||
mkpart luks 1500 100%
|
||||
quit
|
||||
# `partprobe`
|
||||
# Make filesystems:
|
||||
## `mkfs.fat -F 32 -n boot /dev/disk/by-partlabel/boot`
|
||||
## `cryptsetup luksFormat --label luks /dev/disk/by-partlabel/luks && cryptsetup open /dev/disk/by-partlabel/luks lvm`
|
||||
## `pvcreate /dev/mapper/lvm`
|
||||
## `vgcreate lvmvg /dev/mapper/lvm`
|
||||
## `lvcreate -L 10G lvmvg -n swap` && `mkswap -L /dev/mapper/lvmvg-swap` && `swapon /dev/mapper/lvmvg-swap`
|
||||
## `lvcreate -L 800G lvmvg -n hv_ochsenchopf` && mkfs.btrfs -L hv_ochsenchopf /dev/mapper/lvmvg-hv_ochsenchopf
|
||||
## `sync`
|
||||
# Create btrfs subvolumes
|
||||
## `mkdir /mnt/btrfs-root && mount /dev/mapper/lvmvg-hv_ochsenchopf /mnt/btrfs-root && pushd /mnt/btrfs-root`
|
||||
## `btrfs subvolume create nixos`
|
||||
## `btrfs subvolume create home`
|
||||
## `popd && umount /mnt/btrfs-root && rmdir /mnt/btrfs-root`
|
||||
# Mount Filesystems for installation
|
||||
## `mount -o subvol=nixos /dev/mapper/lvmvg-hv_ochsenchopf /mnt`
|
||||
## `mkdir /mnt/{etc,boot,home}`
|
||||
## `mount -o subvol=home /dev/mapper/lvmvg-hv_ochsenchopf /mnt/home`
|
||||
## `mount /dev/disk/by-label/boot /mnt/boot`
|
||||
# Create system configuration
|
||||
## `nixos-generate-config --root /mnt && mv /mnt/etc/{nixos,nixos_generated}`
|
||||
## `nix-shell -p git`
|
||||
## `git clone --recurse-submodules git@github.com:fabianhauser/nixconfig.git /mnt/etc/nixos`
|
||||
# Adjust configuration manually (Symlink host config, customize partition/disk names etc.
|
||||
## `rm -r /mnt/etc/nixos_generated`
|
||||
## Update nixos channels (TODO: With flakes, this is not neccessary anymore)
|
||||
## pushd /mnt/etc/nixos; ln -s host/ochsenchopf/default.nix configuration.nix; popd
|
||||
# `nixos-install`
|
||||
# `reboot`
|
||||
# Whoop whoop
|
||||
|
|
Loading…
Add table
Reference in a new issue