Skip to content

nix-config

Nix Config Validation

Installation Steps

1. Install Nix using Determinate Systems installer

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --determinate

2. Install Xcode Command Line Tools (if on mac)

xcode-select --install

3. Clone this repo

  • Use git in a temporary nix-shell
nix-shell -p git

Clone the repo.

mkdir ~/nix-config
cd ~/nix-config
git clone https://github.com/aleksanderbl29/nix-config .

Exit the nix-shell after cloning the repo.

4. Build the system for the first time

You don't have to specify the hostname as long as the machine hostname is one of the outputs in flake.nix.

MacOS

nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake ~/nix-config/

NixOS

sudo nixos-rebuild switch --flake ~/nix-config#

All subsequent rebuilds can be done with the same command on all systems.

nixswitch