2022-11-02 22:05:26 +00:00
2022-10-02 20:33:40 +02:00
2022-10-02 20:33:40 +02:00
2022-10-02 20:33:40 +02:00

Installing

Fresh system (nixos USB drive)

  1. Open a nix-shell with git:

> nix-shell -p git

  1. Clone the flake

> git clone https://git.lajuntament.space/marc/samfelag.git

  1. 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 <<device: e.g /dev/nvme0n1>>

> 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 <<device: e.g. /dev/nvme0n1p1>> > sudo fatlabel /dev/nvme0n1p1 BOOT

3.2 Create the root partition > sudo mkfs.ext4 <<device: e.g. /dev/nvme0n1p2>> -L nixos

3.3 Create the swap partition > sudo mkswap <<device: e.g. /dev/nvme0n1p3>> -L swap

  1. Create the host nix configuration

If the host is not present under system/hosts, create a new folder for the host.

Description
Nix flake with the configuration for all my nix based systems
Readme 15 MiB
Languages
Nix 52.6%
Emacs Lisp 20%
Shell 13.4%
HCL 12.8%
SCSS 1.2%