• Stars
    star
    367
  • Rank 116,257 (Top 3 %)
  • Language
    Nix
  • License
    MIT License
  • Created over 1 year ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Wimpy's NixOS, nix-darwin & Home Manager Configurations ❄️

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 OEM Model OS Role Status
designare DIY i9-9900K NixOS Desktop Done
noname DIY AMD 5900X, 6900 XT NixOS Gamestation Done
node202 DIY AMD 5700G, 6700 XT ChimeraOS Gamestation Done
vm VM - NixOS Desktop Done
ripper DIY AMD 3970X NixOS Desktop Done
nuc Intel NUC5i7RYH NixOS Server WIP
skull Intel NUC6i7KYK NixOS Server Done
brix Gigabyte GB-BXCEH-2955 NixOS Server WIP
trooper DIY AMD 5950X, 3080Ti NixOS Desktop Done
zed Lenovo ThinkPad Z13 Gen 1 NixOS Laptop Done
p1 Lenovo ThinkPad P1 Gen 1 NixOS Laptop Done
pi4 Raspberry Pi Raspberry Pi 4 Ubuntu MATE Desktop tbn
pinebook Pine64 Pinebook - Laptop tbn
pinebook-pro Pine64 Pinebook Pro - Laptop tbn
c630 Lenovo Yoga C630 Windows 10S Laptop tbn
pocket GPD Pocket Ubuntu MATE Laptop tbn
pocket2 GPD Pocket 2 Ubuntu MATE Laptop tbn
pocket3 GPD Pocket 3 Ubuntu MATE Laptop tbn
p2-max GPD P2 Max NixOS Laptop Done
micropc GPD Micro PC NixOS Laptop WIP
win2 GPD WIN 2 NixOS Laptop WIP
win-max GPD WIN Max NixOS Laptop WIP
falcon TopJoy Falcon Ubuntu MATE Laptop tbn
macair Apple Macbook Air M2 15" macOS Laptop Done
nixair Apple Macbook Air M2 15" NixOS Laptop WIP
macbookpro Apple Macbook Pro 2015 macOS Laptop tbn
xps-13 Dell XPS 13 9360 Ubuntu MATE Laptop tbn
spectre HP Spectre 13 Ubuntu MATE Laptop tbn
apollo Entroware Apollo 2000 Ubuntu MATE Laptop tbn

As featured on Linux Matters podcast! 🎙️ I am a presenter on Linux Matters and this configuration was featured in Episode 7 - Immutable Desktop Linux for Anyone.

Linux Matters Podcast
Linux Matters Podcast

Structure

The nixos/_mixins and home-manager/_mixins are a collection of composited configurations based on the arguments defined in flake.nix.

Installing 💾

  • Boot off a .iso image created by this flake using build-iso-desktop or build-iso-console (see below)
  • Put the .iso image on a USB drive
  • Boot the target computer from the USB drive
  • Two installation options are available: 1 Use the graphical Calamares installer to install an ad-hoc system 2 Run install-system <hostname> <username> from a terminal
    • The install script uses Disko to automatically partition and format the disks, then uses my flake via nixos-install to complete a full-system installation
    • This flake is copied to the target user's home directory as ~/Zero/nix-config
  • Make a cuppa 🫖
  • Reboot
  • Login and run switch-home (see below) from a terminal to complete the Home Manager configuration.

If the target system is booted from something other than the .iso image created by this flake, you can still install the system using the following:

curl -sL https://raw.githubusercontent.com/wimpysworld/nix-config/main/scripts/install.sh | bash -s <hostname> <username>

Applying Changes ✨

I clone this repo to ~/Zero/nix-config. NixOS and Home Manager changes are applied separately because I have some non-NixOS hosts.

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

NixOS ❄️

A switch-host alias is provided that does the following:

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

Home Manager 🏠️

A switch-home alias is provided that does the following:

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

ISO 📀

build-iso-desktop (desktop) and build-iso-console (console only) aliases are provided that create .iso images from this flake. They do the following:

pushd $HOME/Zero/nix-config
nix build .#nixosConfigurations.iso.config.system.build.isoImage
popd

A live image will be left in ~/$HOME/Zero/nix-config/result/iso/. These .iso images are also periodically built and published via [GitHub Actions and are available in this project's Releases](https://github.com/wimpysworld/nix-config/releases).

What's in the box? 🎁

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

Structure

Here is the directory structure I'm using.

.
├── home-manager
│   ├── _mixins
│   │   ├── console
│   │   ├── desktop
│   │   ├── services
│   │   └── users
│   └── default.nix
├── nixos
│   ├── _mixins
│   │   ├── desktop
│   │   ├── hardware
│   │   ├── services
│   │   ├── users
│   │   └── virt
│   ├── designare
│   ├── iso
│   ├── skull
│   ├── vm
│   ├── z13
│   └── default.nix
├── overlays
├── pkgs
├── scripts
└── flake.nix

The Shell 🐚

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

fastfetch on Trooper

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

Alt

TODO 🗒️

Things I should do or improve

Game Development

  • Defold
  • Godot
  • PICO-8

Shell

  • fzf
  • tmate or tmux
  • git-graph and/or git-igitt integration

Servers

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. After I created my initial flake I found nix-starter-configs by Gabriel Fontes which is an excellent starting point. I'll be incorporating many of the techniques it demonstrates in my nix-config.

I 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.

The Disko implementation and automated installation are chasing the ideas outlined in these blog posts:

More Repositories

1

deb-get

apt-get for .debs published via GitHub or direct download 📦
Shell
1,321
star
2

desktopify

Convert Ubuntu Server for Raspberry Pi into a Desktop
Shell
521
star
3

rolling-rhino

Rolling Rhino; convert Ubuntu into a rolling release. As seen on YouTube 📺
Shell
430
star
4

umpc-ubuntu

Scripts for UMPCs such as GPD Pocket, Pocket 2, MicroPC & TopJoy Falcon
Shell
211
star
5

retro-home

Retro Home; your home for retro-gaming 🕹
Shell
109
star
6

antsy-alien-attack

A game, written in Bash, that is a somewhat retro-a-like shoot 'em up. Hopefully.
Shell
107
star
7

obs-studio-portable

Portable OBS Studio for Ubuntu bundled with 50 plugins
Shell
83
star
8

argon1-ubuntu

Argon 1 Case and Argon Fan HAT controller for Ubuntu
Shell
70
star
9

obs-fully-loaded

OBS Studio, fully-loaded, for Ubuntu
Shell
57
star
10

little-spy

Airdrop into an enemy stronghold, recover stolen intelligence and technology. Fight your way out! 🎮
GDScript
41
star
11

ia-get

File downloader for archive.org ⬇️
Rust
38
star
12

stream-sprout

Restream a video source to multiple destinations such as Twitch, YouTube, Owncast and Peertube 📡
Shell
25
star
13

machinespawn

Wrapper for machinectl and systemd-nspawn for creating containers
Shell
22
star
14

redirect-livechat

A simple Python 🐍 server that redirects to a YouTube 📺 channel's most recent live chat 💬 URL
Python
16
star
15

trackmania-2020-ubuntu

Ubuntu Install & Launcher script for TrackMania 2020 🏁🏎
Shell
10
star
16

antsy-alien-attack-pico

The year is 2139. Planet Earth is under attack by aliens, and they're (still) antsy! 👾🛸💥
HTML
9
star
17

ubuntu-pi-image

Raspberry Pi 🥧 image creator for Ubuntu MATE 🧉
Shell
8
star
18

obs-studio-flaking-loaded

OBS Studio for NixOS ❄️ that bundles an extensive collection of 3rd party plugins
5
star
19

obs-dvd-screensaver

DVD screen saver for OBS Studio 📀
CMake
5
star
20

kruiz-control-triggers

Kruiz Control 🎛️ Triggers for Twitch Chatbot, OBS Studio Automation & DecAPI
HTML
3
star
21

obs-rgb-levels

RGB levels plugin for OBS Studio 🎚️🌈
CMake
1
star