diff --git a/README.org b/README.org index 96ea9df..5995118 100644 --- a/README.org +++ b/README.org @@ -3,88 +3,33 @@ ** Fresh system (nixos USB drive) 1. Open a nix-shell with git: -> nix-shell -p git +#+BEGIN_SRC bash +nix-shell -p git +#+END_SRC -2. Clone the flake -> git clone https://git.lajuntament.space/marc/samfelag.git +1. Clone the flake +#+BEGIN_SRC bash +git clone https://git.lajuntament.space/marc/samfelag.git +#+END_SRC -3. Partition the disk +1. Partition the disk + 1. Locate the disk + #+BEGIN_SRC bash + lsblk + #+END_SRC -3.0 Locate the disk -> lsblk +1. Mount the filesystems -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. Mount the filesystems -> - -5. Create the host nix configuration +1. Create the host nix configuration If the host is not present under system/hosts, create a new folder for the host. Generate the hardware configuration file, you can use nixos-generate-config as a base: -> nixos-generate-config --dir <> --no-filesystems +#+BEGIN_SRC bash +nixos-generate-config --dir <> --no-filesystems +#+END_SRC -6. Install nixos! -> sudo nixos-install --impure --flake .#reykjavik +1. Install nixos! + +#+BEGIN_SRC bash +sudo nixos-install --impure --flake .#reykjavik +#+END_SRC