Something went wrong. Try again.
Nix Configurations
Something went wrong. Try again.
Files
- Nix 100%
README.md
Nix System Configuration #
A unified Nix flake configuration for managing both macOS (via nix-darwin) and NixOS systems with shared modules and home-manager integration.
Overview #
This repository contains declarative system configurations for:
- homer - macOS (Apple Silicon / aarch64-darwin)
- omnidroid - NixOS (x86_64-linux)
Structure #
.
├── flake.nix # Main flake entry point
├── flake.lock # Locked dependencies
├── machines/
│ └── nixos/
│ ├── configuration.nix # NixOS-specific system config
│ └── hardware-configuration.nix
├── modules/
│ ├── base.nix # Shared configuration (both platforms)
│ ├── macos.nix # macOS-specific settings
│ ├── linux.nix # Linux-specific settings
│ └── linux_gui.nix # Linux GUI/desktop settings
└── users/
└── naren/
└── home.nix # Home Manager configuration
Features #
Shared (base.nix) #
- Nix flakes and nix-command enabled
- Distributed builds with remote builder support
- Common CLI tools: jujutsu, vim, git, tailscale, btop, bat, zoxide, eza, fzf, delta, ripgrep, zellij, fd, and more
macOS (macos.nix) #
- Automatic garbage collection (weekly)
- Vesktop (Discord client)
NixOS (linux.nix + linux_gui.nix) #
- COSMIC desktop environment
- Steam gaming support
- Ghostty terminal
- Zen Browser
- Zed editor
- JetBrains Mono Nerd Font
Home Manager (home.nix) #
- Git and Jujutsu version control configuration
- Shell setup (Bash, Nushell) with aliases
- Zoxide directory jumping
- Delta diff viewer
- Zed editor with extensions and custom settings
- Ghostty terminal configuration
- Starship prompt with custom theme and Jujutsu integration
Usage #
Prerequisites #
- Nix with flakes enabled
- For macOS: nix-darwin
Building #
# Check the flake for errors
nix flake check
# Build macOS configuration
nix build .#darwinConfigurations.homer.system
# Build NixOS configuration
nix build .#nixosConfigurations.omnidroid.config.system.build.toplevel
Applying Configuration #
macOS #
# First time setup
sudo nix run nix-darwin/nix-darwin-25.11#darwin-rebuild -- switch --flake .
# Subsequent updates (after darwin-rebuild is in PATH)
darwin-rebuild switch --flake .
NixOS #
sudo nixos-rebuild switch --flake .#omnidroid
Flake Inputs #
| Input | Description |
|---|---|
nixpkgs |
NixOS 25.11 stable packages |
nixpkgs-unstable |
Unstable channel for bleeding-edge packages |
nix-darwin |
macOS system configuration |
home-manager |
User environment management |
ghostty |
GPU-accelerated terminal emulator |
zed |
Zed editor |
zen-browser |
Privacy-focused browser |
Remote Builds #
This configuration supports distributed x86_64-linux builds to a remote builder via Tailscale.
Notes #
- Both systems use Tailscale for networking
- The configuration uses the 25.11 release branch
- Unfree packages are allowed on unstable channel imports
- Home Manager is integrated as a module (not standalone)
License #
Personal configuration - feel free to use as reference for your own setup.