aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2024-03-31 22:45:59 +0200
committerJoris2024-03-31 22:45:59 +0200
commit727bbf7da46d63d97e31eeb733b7dabed3c82561 (patch)
tree4fa379ab9181284a4311616579e95248ac750273
parent0896cec87b3398b4ed90594aacca3b80cadf92d8 (diff)
Transform ol to ul
-rw-r--r--README.md88
1 files changed, 44 insertions, 44 deletions
diff --git a/README.md b/README.md
index 0df651c..d13ba67 100644
--- a/README.md
+++ b/README.md
@@ -7,17 +7,17 @@
# Prepare and boot the installation media
-1. Download NixOS ISO at https://nixos.org/download.html.
+Download NixOS ISO at https://nixos.org/download.html.
-2. Write ISO to a USB stick:
+Write ISO to a USB stick:
```sh
sudo dd if=nix.iso of=/dev/sdX bs=4M status=progress
```
-3. Boot from the USB stick on the target machine.
+Boot from the USB stick on the target machine.
-4. Connect as sudo:
+Connect as sudo:
```sh
sudo su
@@ -25,16 +25,16 @@
# SWAP size
-1. Check your RAM with `top`.
+Check your RAM with `top`.
-2. Get the SWAP size according to your RAM size and if you need hibernation:
+Get the SWAP size according to your RAM size and if you need hibernation:
https://itsfoss.com/swap-size/
# Partition the disk
-1. Use `lsblk` your show block devices.
+Use `lsblk` your show block devices.
-2. Launch `gdisk /dev/<disk>`:
+Launch `gdisk /dev/<disk>`:
- verify the partition table with `v`,
- delete every partition with `d`,
@@ -42,14 +42,14 @@ https://itsfoss.com/swap-size/
- add a system partition (8300 Linux LVM) on the remaining space with `n`,
- write the partition table with `w`.
-3. Encrypt your disk and open it:
+Encrypt your disk and open it:
```sh
cryptsetup luksFormat /dev/<SYSTEM>
cryptsetup luksOpen /dev/<SYSTEM> crypted
```
-4. Create swap and root logical volumes:
+Create swap and root logical volumes:
```sh
pvcreate /dev/mapper/crypted
@@ -58,7 +58,7 @@ https://itsfoss.com/swap-size/
lvcreate -l '100%FREE' -n root vg
```
-5. Format the partitions:
+Format the partitions:
```sh
mkfs.fat -F 32 -n BOOT /dev/<BOOT>
@@ -66,7 +66,7 @@ https://itsfoss.com/swap-size/
mkswap -L swap /dev/vg/swap
```
-6. Mount partitions
+Mount partitions
```sh
mount /dev/vg/root /mnt
@@ -77,25 +77,25 @@ https://itsfoss.com/swap-size/
# Connect to Internet
-1. Note your wifi interface:
+Note your wifi interface:
```sh
ifconfig
```
-2. Scan available ESSID with:
+Scan available ESSID with:
```sh
iwlist <INTERFACE> scan | grep ESSID
```
-3. Write `wpa_supplicant` configuration:
+Write `wpa_supplicant` configuration:
```sh
wpa_passphrase <ESSID> | sudo tee /etc/wpa_supplicant.conf
```
-4. Start `wpa_supplicant`:
+Start `wpa_supplicant`:
```sh
wpa_supplicant -B -i <INTERFACE> -c /etc/wpa_supplicant.conf
@@ -103,15 +103,15 @@ https://itsfoss.com/swap-size/
# Install
-1. Generate configuration:
+Generate configuration:
```sh
nixos-generate-config --root /mnt
```
-2. Rename disks by labels in `mnt/etc/nixos/hardware-configuration.nix`.
+Rename disks by labels in `mnt/etc/nixos/hardware-configuration.nix`.
-3. Complete `/mnt/etc/nixos/configuration.nix`
+Complete `/mnt/etc/nixos/configuration.nix`
```nix
# Hostname
@@ -150,19 +150,19 @@ https://itsfoss.com/swap-size/
};
```
-4. Install:
+Install:
```sh
nixos-install
```
-5. Set user password:
+Set user password:
```sh
passwd joris
```
-6. Reboot:
+Reboot:
```sh
reboot
@@ -182,9 +182,9 @@ If the system doesn’t boot, boot from the USB key, and:
# Import GPG key
-1. Plug in recuperation key and check label with `lsblk`.
+Plug in recuperation key and check label with `lsblk`.
-2. Decrypt and mount private backup:
+Decrypt and mount private backup:
```sh
sudo cryptsetup luksOpen /dev/XXX secrets
@@ -192,56 +192,56 @@ If the system doesn’t boot, boot from the USB key, and:
sudo mount /dev/mapper/secrets encrypted-storage
```
-3. Import:
+Import:
```sh
gpg --import encrypted-storage/pubkey.asc
gpg --allow-secret-key-import --import encrypted-storage/privkey.asc
```
-4. Trust:
+Trust:
```sh
gpg --edit-key joris@guyonvarch.me
gpg> trust
```
-5. Write SSH keygrip in `~/.gnupg/sshcontrol`:
+Write SSH keygrip in `~/.gnupg/sshcontrol`:
```sh
gpg2 -K --with-keygrip # [A] keygrip
```
-6. Verify that SSH key is available:
+Verify that SSH key is available:
```sh
ssh-add -L
```
-7. Unmount and close the encrypted volume:
+Unmount and close the encrypted volume:
```bash
sudo umount encrypted-storage/
sudo cryptsetup luksClose secret
```
-8. Unplug the volume.
+Unplug the volume.
# Clone the system
-1. Connect to Internet:
+Connect to Internet:
```sh
nmtui
```
-2. Install git:
+Install git:
```sh
nix-env -i git
```
-3. Clone the configuration:
+Clone the configuration:
```sh
git clone git@guyonvarch.me:/home/git/config /home/joris/code/config
@@ -249,28 +249,28 @@ If the system doesn’t boot, boot from the USB key, and:
git checkout main
```
-4. Extract the system’s `hardware-configuration.nix`, and add it to `./hosts/joris/hardware/`.
+Extract the system’s `hardware-configuration.nix`, and add it to `./hosts/joris/hardware/`.
-5. Move aside the previous configuration:
+Move aside the previous configuration:
```sh
cp -r /etc/nixos config-old
sudo rm -rf /etc/nixos
```
-6. Link `/etc/nixos` to the configuration:
+Link `/etc/nixos` to the configuration:
```sh
sudo ln -s /home/joris/code/config /etc/nixos
```
-7. Disable automatic export of documents if it’s not the principal system.
+Disable automatic export of documents if it’s not the principal system.
-8. Change network interface in `hosts/network/joris/connman.nix`.
+Change network interface in `hosts/network/joris/connman.nix`.
-9. Remove `.gnupg/.sshcontrol`
+Remove `.gnupg/.sshcontrol`
-10. Build:
+Build:
```sh
nixos-rebuild switch
@@ -278,25 +278,25 @@ If the system doesn’t boot, boot from the USB key, and:
# Setup user environment
-1. Create user directories:
+Create user directories:
```sh
mkdir code documents downloads music pictures videos
```
-2. Create `.less` to setup less keybindings from `.lesskey`:
+Create `.less` to setup less keybindings from `.lesskey`:
```sh
lesskey
```
-3. Setup password store:
+Setup password store:
```sh
git clone git@guyonvarch.me:/home/git/password-store.git .password-store
```
-4. Get documents:
+Get documents:
```sh
duplicity restore rsync://guyonvarch.me/~/backups/documents documents