2022-11-03 23:06:47 +01:00
2022-10-02 20:33:40 +02:00
2022-11-02 22:51:28 +00:00
2022-11-03 23:06:47 +01:00
2022-10-02 20:33:40 +02:00
2022-11-02 22:51:28 +00:00
2022-11-03 21:14:32 +00: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

    1. Locate the disk
    lsblk
    1. Create a GPT partition table
    sudo parted /dev/nvme0n1 -- mklabel gpt
    1. Create the root partition
    sudo parted /dev/nvme0n1 -- mkpart primary 512MB -8GB
    1. Create the swap partition
    sudo parted /dev/nvme0n1 -- mkpart primary linux-swap -8GB 100%
    1. Create the boot partition
    sudo parted /dev/nvme0n1 -- mkpart ESP fat32 1MB 512MB
    sudo parted /dev/nvme0n1 -- set 3 esp on
  2. Format the partitions

    1. Root partition
    sudo mkfs.ext4 -L nixos /dev/nvme0n1p1
    1. Swap partition
    sudo mkswap -L swap /dev/nvme0n1p2
    1. Boot partition
    sudo mkfs.fat -F 32 -n BOOT /dev/nvme0n1p3
  3. Mount the filesystems

    1. Root partition
    sudo mount /dev/disk/by-label/nixos /mnt
    1. Boot partition
    sudo mkdir -p /mnt/boot
    sudo mount /dev/disk/by-label/BOOT /mnt/boot
    1. Swap partition (if needed)
    sudo swapon /dev/disk/by-label/swap
  4. 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 <<host directory>> --no-filesystems
  1. Install nixos!
sudo nixos-install --impure --root /mnt --flake .#reykjavik
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%