Skip to content

cmacrae/config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmacrae’s config

https://img.shields.io/badge/Built_With-Nix-5277C3.svg?logo=nixos&labelColor=73C3D5

A collection of system configurations, expressed in Nix. This repository is based on Nix Flakes, composed elegantly by flakelight.

Conventions

  • All non-nix configuration that could be considered inconvenient to maintain as a string lives in conf.d
  • To keep things tidy, flakelight allows for the use of a directory structure that mimic’s a flake’s outputs. As such, expressions can be found in their dir counterparts under nix/ (with one exception: nixosConfigurations -> nixos)
  • In keeping with good practices, common “recipies” are presented as modules which are “layered” onto a system’s configuration. For example, a laptop configuration may import: common, home, and graphical modules - which are defined under nix/nixosModules
  • Individual machine configurations are kept as minimal as possible, such that they only include properties pertaining only to that machine

Features

Quite hard to capture all the benefits I feel I’ve garnered by way of my meticulous obsession with declarative systems, but here are a few key points

  • Supports some flake native conventions: additional checks (nix flake check) with deadnix & statix, formatter (nix fmt) with nixpkgs-fmt (also enforced in-editor via nil)
  • Dead-simple remote deployments with lollypops, mapped to a flake app (nix run interface for deployments & local rebuild)
  • Secrets management is also handled by lollypops, backed by pass, which I secure with a YubiKey (in fact all cryptographic operations, including SSH - which extends to the previously mentioned deployments - and Git signing, all go via PGP, and thus my YubiKey)
  • Graphical systems are pure Wayland: minimal session management handled by greetd/tuigreet, colour scheme (configurable on a per-system basis) inherited with stylix (further composed & mapped to CSS)
  • My other OS, Emacs, wrapped up into a package, nixified via emacs-overlay’s emacsWithPackagesFromUsePackage, with an init.el derivation included in relevant system closures
  • Many more fancy things… 💫

Machines

There are several machines defined in nix/nixos

midnight

My daily driver: an M2 MacBook Air (running NixOS, courtesy of the amazing Asahi Project & nixos-apple-silicon). A minimal macOS installation remains, but it’s pretty much just an Ableton hypervisor

nilbook

M3 MacBook Pro for work, macOS

net1

A Raspberry Pi 5 that acts as a DHCP (Kea), DNS (blocky), and proxy (nginx) server for upstream media services, also a WireGuard gateway to my home network

compute1, compute2, compute3

3 Intel NUCs that occupy 1u in my cabinet. Homelab & various media management services

About

A collection of machine configurations, expressed in Nix

Topics

Resources

Stars

Watchers

Forks