kayvank / dotfiles

my nixos systems configurations files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is this?

my collection of dot files for building my nixos systems.

Installation

The installation process is in 2 stages:

  • installing minimal system
  • installing system & user configuration

Obtaining NixOs

This step requires the minimal NixOs image. Options are:

  • download the minimal image
  • build the minimal image

Downloading minimal image:

Simply follow the steps in NixOs user-guide

Building the minimal image

First, write the following in to a file named custom-media.nix:

{ pkgs, modulesPath, ... }: {
    imports = [
        "${modulesPath}/installer/cd-dvd/installation-cd-graphical-gnome.nix"
    ];

    boot.kernelPackages = pkgs.linuxPackages_latest;
}

Then enter a nix-shell with nixos-generators and build the media:

nix-shell -p nixos-generators
nix-shell$ nixos-generate -I nixpkgs=channel:nixos-unstable --format iso --configuration ./custom-media.nix 

Finally copy the ISO to USB disk, on my system its /dev/sda.

Note: the sync at the end is critical.

$ sudo cp /nix/store/gnnbjvd916yh1f4svbgrssq94550pbxl-nixos-21.11pre304626.8ecc61c91a5-x86_64-linux.iso/iso/nixos-21.11pre304626.8ecc61c91a5-x86_64-linux.iso /dev/sda
$ sudo sync

BIOS related stuff

  • Disable RAID mode

Installing minimal NixOs system

Follow the NixOs Chapter2 user-guide

Side Note

For my system, I used swap file in favor of swap partition.

Configuring the system

To configure the system:

git clone git@github.com:kayvank/dotfiles.git ~/.config/dotfiles
cd ~/.config/dotfiles
  • Installing system configurations:
./apply-system ## installs system configs
./update
  • Installing user configurations:
cd ~/.config/dotfiles
./apply-user.sh  ## installs user configs
./update

Reference

The main idea for this repo is from:

About

my nixos systems configurations files


Languages

Language:Nix 61.9%Language:Haskell 33.8%Language:Shell 2.9%Language:NASL 1.4%