dustinlyons / nixos-config

My NixOS config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dustin's Nix / NixOS config


These are my "dotfiles" contained within Nix deriviations that drive setup and configuration of, as of this writing

  • my Macbook Pro
  • a NixOS workstation sitting on my desk at home
  • an old Thinkpad I use as an air-gapped machine
  • virtual machines on my home-lab Proxmox server

In a previous life my configuration was driven by Guix, but with the release of new Apple Silicon I started exploring other options. Enter Nix and NixOS.


  1. Simplicity as a guiding principle; Nix is notoriously confusing so make it easy to understand
  2. Entirely driven by my single Flake
  3. Supports sharing common config between an M1 Macbook Pro and NixOS PCs
  4. Simple bash scripts to build and switch environments

Bootstrap New Computer

Step 1 - For foreign distros (namely MacOS), install Nix package manager

Install the nix package manager:

sh <(curl -L https://nixos.org/nix/install) --daemon
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
nix-channel --update

Step 2 - Install home-manager

Install the nix package manager:

nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update

Step 3 - If MacOS, install Darwin dependencies

Install nix-darwin, a native set of Nix modules for MacOS, and Xcode CLI tools.

xcode-select --install
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer

Step 4 - Build the environment

Grab the latest nix-config zip file from Github, move to the directory and run




Step 5 - Add Yubikey and generate key

Insert laptop Yubikey and generate private keys

ssh-keygen -t ecdsa-sk

Step 6 - Reboot computer

That's it. You're done.

Get in touch

  • Feedback or questions? Find me on Twitter.
ezoic increase your site revenue


My NixOS config


Language:Nix 87.3%Language:Emacs Lisp 8.9%Language:Shell 3.8%