Skip to content

nix (via nix-darwin, nixos, nix-on-droid, home-manager, etc.) declarative configurations to attain my deterministically reproducible layer

License

Notifications You must be signed in to change notification settings

DivitMittal/OS-nixCfg

Repository files navigation

An abstract image of a donut-like object

OS-nixCfg

My personal declarative Nix configurations for macOS, Android, and Linux (NixOS/WSL).



Contents


Overview

This repository contains primarily nix configurations, leveraging Nix Flakes, Home Manager, and system-specific modules (NixOS, nix-darwin, nix-on-droid) to achieve a purely declarative, reproducible, and consistent environment across multiple OSes on multiple hosts for multiple users:

  • macOS (via nix-darwin)
  • Android (via nix-on-droid)
  • *nix (NixOS) (including WSL via NixOS-WSL)

Project Structure

The repository is organized using flake-parts for better modularity.

.
├── .claude/                  # Claude AI assistant configuration
│   ├── commands/
│   │   └── openspec/
│   ├── .mcp.json
│   ├── CLAUDE.md
│   └── settings.json
├── .github/                  # GitHub Actions workflows & funding
│   ├── workflows/
│   └── FUNDING.yml
├── assets/                   # Images and visual assets
│   ├── topology/
│   │   ├── main.svg
│   │   └── network.svg
│   ├── home_graph.png
│   ├── qezta.gif
│   └── qezta.png
├── common/                   # Shared configurations across all platforms
│   ├── all/                  # Common to all configurations
│   ├── home/                 # Common home-manager configurations
│   └── hosts/                # Common host configurations
│       ├── all/
│       ├── darwin/
│       ├── droid/
│       ├── iso/
│       └── nixos/
├── flake/                    # Flake-parts module definitions
│   ├── actions/              # GitHub Actions definitions
│   ├── topology/             # Network topology configuration
│   ├── checks.nix
│   ├── devshells.nix
│   ├── formatters.nix
│   ├── iso-packages.nix
│   └── mkCfg.nix             # Universal host builder
├── home/                     # Home-manager modules by category
│   ├── comms/                # Communication (email, IRC, newsboat)
│   ├── dev/                  # Development tools (JS, Python, cloud)
│   ├── gui/                  # GUI applications and desktop managers
│   ├── media/                # Media tools (image, video, music)
│   ├── tools/                # Utilities (privacy, productivity, keyboard)
│   ├── tty/                  # Terminal tools (editors, shells, multiplexers)
│   └── web/                  # Web browsers and related tools
├── hosts/                    # Platform-specific host configurations
│   ├── darwin/               # macOS hosts (nix-darwin)
│   │   └── L1/
│   ├── droid/                # Android hosts (nix-on-droid)
│   │   └── M1/
│   ├── iso/                  # ISO configurations
│   │   ├── iso/
│   │   └── t2-iso/
│   └── nixos/                # NixOS hosts
│       ├── L2/
│       └── WSL/
├── lib/                      # Custom Nix utility functions
│   └── custom.nix
├── modules/                  # Custom NixOS/home-manager modules
│   ├── home/
│   └── hosts/
│       └── darwin/
├── openspec/                 # OpenSpec project documentation
│   ├── AGENTS.md
│   └── project.md
├── overlays/                 # Nix package overlays
│   └── custom.nix
├── pkgs/                     # Custom package derivations
│   ├── custom/               # Custom derivations
│   └── darwin/               # macOS-specific packages
├── templates/                # Nix flake templates
│   └── vanilla/
├── utils/                    # Build and rebuild scripts
│   ├── common.sh
│   ├── home_rebuild.sh
│   └── hosts_rebuild.sh
├── .editorconfig
├── .envrc
├── .gitattributes
├── .gitignore
├── AGENTS.md                 # AI agent instructions
├── CODEOWNERS
├── flake.lock
├── flake.nix                 # Main flake entry point
├── LICENSE
├── README.md
├── SECURITY.md
└── shell.nix

Home Manager Profile Graph

This dependency graph visualizes the dependencies of the Home-Manager profile configuration:

Home Manager Profile Dependency Graph

Network Topology

The network topology visualizations are automatically generated using nix-topology and provide a comprehensive view of the infrastructure setup across all hosts and networks.

Main Topology

Complete view of all nodes, networks, and their interconnections:

Main Network Topology

Network View

Focused visualization of network segments and connectivity:

Network Topology View

Note: These topology diagrams are automatically built and updated via GitHub Actions whenever topology configurations.

Secrets Management

Secrets (API keys, passwords, sensitive configurations) are managed via agenix or specificaly ragenix.

  1. Secrets are encrypted using ssh keys. My public key is explicitly available to ragenix.
  2. The encrypted files reside in a private GitHub repository: DivitMittal/OS-nixCfg-secrets. This repository is referenced as a flake input.
  3. During the Nix build process, agenix decrypts these files using my private key.
  4. The decrypted files are placed in the Nix store & symlinked to their target locations.

⚠️ Building this configuration requires access to the private DivitMittal/OS-nixCfg-secrets repo and the corresponding age private ssh key.

Related Repositories

About

nix (via nix-darwin, nixos, nix-on-droid, home-manager, etc.) declarative configurations to attain my deterministically reproducible layer

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages