/nix-config

NixOS & Home Manager Configurations

Primary LanguageNixMIT LicenseMIT

Wimpy's NixOS & Home Manager Configurations

This repository contains a Nix Flake for configuring my computers and home environment. These are the computers this configuration currently manages:

Hostname Model Role Status
designare DIY i9-9900K Desktop Done
z13 Lenono ThinkPad Z13 Laptop WIP
skull Intel NUC6i7KYK Server WIP

Structure

The host/_mixins and home/_mixins are a collection of generic configurations that are composited based on the arguments defined in flake.nix.

Installing 💾

This is a work in progress, I will be working towards making installation using my NixOS configuration way more automated. Start a nix shell with flakes enabled and provide git.

nix shell --extra-experimental-features 'nix-command flakes' nixpkgs#git nixpkgs#home-manager

Clone my nix-config and run the install script, which uses Disko to automatically partition and format the disks and uses my flake with nixos-install.

git clone https://github.com/wimpysworld/nix-config.git
cd nix-config
scripts/install.sh <hostname> <username>

Applying Changes ✨

I clone this repo to ~/Zero/nix-config. Home Manager and NixOS changes can be applied separately because I am planning to add support for some non-NixOS hosts.

gh repo clone wimpysworld/nix-config ~/Zero/nix-config

NixOS ❄️

A rebuild-host alias is provided, that does the following:

sudo nixos-rebuild switch --flake $HOME/Zero/nix-config

Home Manager 🏠️

A rebuild-home alias is provided, that does the following:

home-manager switch -b backup --flake $HOME/Zero/nix-config

What's in the box? 🎁

Nix is configured with flake support and the unified CLI enabled.

Structure

This is the directory structure I'm using.

.
├── home
│   ├── _mixins
│   │   ├── console
│   │   └── desktop
│   └── default.nix
├── host
│   ├── _mixins
│   │   ├── base
│   │   ├── boxes
│   │   ├── desktop
│   │   ├── services
│   │   └── users
│   ├── designare
│   ├── generic
│   ├── skull
│   ├── z13
│   └── default.nix
├── scripts
└── flake.nix

The Shell 🐚

Fish shell with powerline-go and a collection of tools that deliver a somewhat "Modern Unix" experience. The base system has a firewall enabled and also includes OpenSSH, Tailscale, Podman & Distrobox and, of course, a delightfully configured nano. (Fight me! 🥊)

neofetch on Designare

The Desktop 🖥️

MATE Desktop 🧉 and Pantheon 🏛️ are the two desktop options available. The font configuration is common with both desktops using Work Sans and Fira Code. The usual creature comforts you'd expect to find in a Linux Desktop are integrated such as Pipewire, Bluetooth, Avahi, CUPS, SANE and NetworkManager.

Desktop System Configuration Theme
MATE MATE Install MATE Configuration Yaru Magenta (Dark)
Pantheon Pantheon Install Pantheon Configuration elementary Bubble Gum (Dark)

Eye Candy 👀🍬

Pantheon on Designare

TODO 🗒️

  • Implement Disko partitioning (WIP)
  • Integrate .iso and VM builds via nixos-generators
  • Integrate Keybase
  • Integrate an Emoji picker
  • Integrate AppCenter and Flathub
  • Integrate Steam
  • Integrate OpenRGB
  • Integrate OpenRazer
  • Integrate Syncthing
  • Integrate fwupd
  • Integrate dotfiles
  • Include image assets such as wallpapers and faces
  • Include Serif fonts
  • Include fallback fonts for Work Sans, Fira Code and Joypixels
  • Move user-specific settings out of general user configuration
  • Move application defaults out of the desktop defaults
  • Add all computers to the table
  • Fix Unfree in Home Manager
  • Fix Magewell driver: nixpkgs#221209
  • Migrate (maybe) to ZFS

Inspirations 🧑‍🏫

Before preparing my NixOS and Home Manager configurations I took a look at what other Nix users are doing. My colleagues shared their configs and tips which included nome from Luc Perkins, nixos-config from Cole Helbling, flake from Ana Hoverbear and her Declarative GNOME configuration with NixOS blog post. A couple of friends also shared their configurations and here's Jon Seager's nixos-config and Aaron Honeycutt's nix-configs. While learning Nix I watched some talks/interviews with Matthew Croughan and Will Taylor's Nix tutorials on Youtube. Will Taylor's dotfiles are worth a look, as are his videos, and Matthew Croughan's nixcfg is also a useful reference.

I really like the directory hierarchy in Jon Seager's nixos-config and the mixin pattern used in Matthew Croughan's nixcfg, so my initial Nix configuration is heavily influenced by both of those. Ana's excellent Declarative GNOME configuration with NixOS blog post was essential to get a personalised desktop. That said, there's plenty to learn from browsing other people's Nix configurations, not least for discovering cool software. I recommend a search of GitHub nixos configuration from time to time to see what interesting techniques you pick up and new tools you might discover.