Nix Configuration for My Devices#
This repository is a centralized system for the provision and configuration of my various devices, leveraging the Nix language for declarative and reproducible system management. It includes configurations for NixOS, macOS (via nix-darwin), OpenWRT (via custom scripts), and Android (via nix-on-droid).
Project Structure#
The project is organized into several key directories:
.design/: Architectural specifications and development roadmap.devices/: Contains specific configurations for each individual machine.modules/: Shared Nix modules used across different systems.lib/: Pure Nix helper functions (e.g., network validation).pkgs/: Custom package definitions and overlays.secrets/: Encrypted secrets managed withsops-nix.
Getting Started#
To explore or modify the configuration:
- Nix Shell: Enter the development shell to access necessary tools (
git,jq,sops, etc.):nix develop - Apply Configuration:
- Baxi (NixOS):
nixos-rebuild switch --flake .#baxi - Thor (macOS):
darwin-rebuild switch --flake .#thor - Vera (Router):
./devices/vera/deploy.sh <router-ip> - Gelt (Android):
nix run .#provision-gelt - Fink (Android):
nix run .#provision-fink
- Baxi (NixOS):
Architectural Principles#
- Declarative: All configurations are defined in Nix files.
- Modular: Shared logic is decoupled into modules for maximum reuse.
- Secure: Secrets are encrypted at rest using
sops-nixandage. - Verified: Automatic validation of network configurations (no duplicate IPs/MACs).