This repository gathers all the configuration needed to install NixOS on several machines using flakes. It is a work in progress. I'm really new at NixOS and I want to experiment and learn about it step by step.
-
Boot the system using NixOS live USB
-
Execute the installation script which is located in scripts/install.sh
curl -sL https://raw.githubusercontent.com/egara/nixos-config/main/scripts/install.sh | bash -s <hostname> <username>
Please, change hostname and username by one of their accepted values:
- hostname: vm
- username: egarcia
This script will:
- Clone this repository https://github.com/egara/nixos-config.git
- Format and create all the needed partitions using Disko
- Install NixOS
- Copy this repo into the new installed system
This stage will be created automatically by Disko.
This is the selected layout for the UEFI/GPT system:
Mount point | Partition | Partition type | FS Type | Label | Bootable flag | Size |
---|---|---|---|---|---|---|
/boot/efi | /dev/vda1 | EFI System Partition | FAT32 | UEFI | Yes | 512 MiB |
[SWAP] | /dev/vda2 | Linux swap | SWAP | swap | No | 1 GiB |
/ | /dev/vda3 | Linux | BTRFS | system | No | Available |
This is the layout defined:
(Volume)
|
├─ @ (Subvolume - It will be the current /)
|
├─ @home (Subvolume - It will be the current /home)
|
├─ @snapshots (Subvolume - It will contain all the snapshots which are subvolumes too)
The whole volume will be mounted and available at /mnt/defvol once the system is installed.
These are the resources I have used to get inspiration and learn a little bit about NixOs.
- Matthias Benaets on GitHub https://github.com/MatthiasBenaets/nixos-config
- Wimpy's World on GitHub https://github.com/wimpysworld/nix-config
- NixOS Tutorial and basic concepts on YouTube by Mathhias Benaets https://www.youtube.com/watch?v=AGVXJ-TIv3Y