From bd9ac68acf981ffb05f91c5299a93cf053e64f6a Mon Sep 17 00:00:00 2001 From: Marc Sastre Rienitz Date: Wed, 2 Nov 2022 22:05:26 +0000 Subject: [PATCH] Partial update of README with installation instructions --- README.org | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/README.org b/README.org index e69de29..8b46e8d 100644 --- a/README.org +++ b/README.org @@ -0,0 +1,83 @@ +* Installing + +** Fresh system (nixos USB drive) + +1. Open a nix-shell with git: +> nix-shell -p git + +2. Clone the flake +> git clone https://git.lajuntament.space/marc/samfelag.git + +3. Partition the disk + +3.0 Locate the disk +> lsblk + +3.1 Create the partition table +You can use GParted or fdisk (example of the latter): +> sudo fdisk <> + +> Command (m for help): g +Created a new GPT disklabel (GUID: CF653F38-902C-0648-B8AF-B4E07A8E0E8C). + +> Command (m for help): n +> Partition number (1-128, default 1): +> First sector (2048-2000409230, default 2048): +> Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-2000409230, default 2000409230): +512M +Created a new partition 1 of type 'Linux filesystem' and of size 512 MiB. + +> Command (m for help): t +Selected partition 1 +> Partition type or alias (type L to list all): 1 +Changed type of partition 'Linux filesystem' to 'EFI System'. + +> Command (m for help): n +> Partition number (2-128, default 2): +> First sector (1050624-2000409230, default 1050624): +> Last sector, +/-sectors or +/-size{K,M,G,T,P} (1050624-2000409230, default 2000409230): -8G +Created a new partition 2 of type 'Linux filesystem' and of size 945.4 GiB. + +> Command (m for help): n +> Partition number (3-128, default 3): +> First sector (1983631360-2000409230, default 1983631360): +> Last sector, +/-sectors or +/-size{K,M,G,T,P} (1983631360-2000409230, default 2000409230): +Created a new partition 3 of type 'Linux filesystem' and of size 8 GiB. + +> Command (m for help): t +> Partition number (1-3, default 3): 3 +> Partition type or alias (type L to list all): 19 +Changed type of partition 'Linux filesystem' to 'Linux swap'. + +> Command (m for help): p +Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors +Disk model: Micron MTFDKBA1T0TFH +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: gpt +Disk identifier: CF653F38-902C-0648-B8AF-B4E07A8E0E8C + +Device Start End Sectors Size Type +/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System +/dev/nvme0n1p2 1050624 1983631359 1982580736 945.4G Linux filesystem +/dev/nvme0n1p3 1983631360 2000409230 16777871 8G Linux swap + +> Command (m for help): w +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. + +3.1 Create the boot partition +> sudo mkfs.fat -F 32 <> +> sudo fatlabel /dev/nvme0n1p1 BOOT + +3.2 Create the root partition +> sudo mkfs.ext4 <> -L nixos + +3.3 Create the swap partition +> sudo mkswap <> -L swap + +4. Create the host nix configuration +If the host is not present under system/hosts, create a new folder for the host. + +