My personal Nix configuration repository, using Nix Flakes to manage macOS, NixOS Desktop, WSL, and server systems in a unified way.
Note
This configuration is tailored to my personal needs. Feel free to use it as a reference for your own setup.
| System | Architecture | Hostname | Status |
|---|---|---|---|
| macOS (Nix-Darwin) | aarch64-darwin | wyf-macbook | ✅ Complete |
| NixOS Desktop | x86_64-linux | nixos-wyf | ✅ Complete |
| NixOS WSL | x86_64-linux | nixwsl | ✅ Complete |
| NixOS Server | x86_64-linux | vps-server | 🚧 WIP |
.
├── flake.nix # Flake entry point
├── flake.lock # Dependency lock file
├── Justfile # Task commands
├── modules/
│ ├── common/ # Cross-platform modules
│ ├── darwin/ # macOS-specific modules
│ └── nixos/ # NixOS-specific modules
├── hosts/ # Host configurations
│ ├── wyf-macbook/
│ ├── desktop-linux/
│ ├── wsl/
│ └── vps-server/
└── home/ # Home Manager configurations
├── common/ # Shared user configs
├── gui/ # GUI-related configs
└── profiles/ # System-specific profiles
| Category | Component |
|---|---|
| Package Management | Nix-Darwin + nix-homebrew |
| User Configuration | Home Manager |
| Terminal Emulator | Ghostty |
| Shell | Zsh + Oh My Zsh + Powerlevel10k |
| Editor | Neovim + VS Code |
| File Manager | Yazi |
| Terminal Multiplexer | Tmux |
| Git TUI | Lazygit |
Homebrew Casks:
- Browser: Google Chrome
- Development: VS Code, Ghostty, Termius
- Communication: QQ, WeChat, WeChat Work, Tencent Meeting
- Utilities: LocalSend, Mos, UTM
Mac App Store:
- Microsoft Office Suite (OneDrive, Excel, PowerPoint, Word)
| Category | Component |
|---|---|
| Window Manager | Niri (Wayland Compositor) |
| Shell Framework | Noctalia Shell |
| User Configuration | Home Manager |
| Terminal Emulator | Ghostty |
| Shell | Zsh + Oh My Zsh + Powerlevel10k |
| Editor | Neovim + VS Code |
| Input Method | Fcitx5 + Rime |
| File Manager | Yazi |
| Audio System | PipeWire |
| Bootloader | GRUB2 + Whitesur Theme |
GUI Applications:
- Browser: Google Chrome
- Development: VS Code, Ghostty
- Multimedia: OBS Studio
- Office Suite: WPS Office
- Communication: QQ, WeChat, Tencent Meeting
| Category | Component |
|---|---|
| WSL Integration | NixOS-WSL |
| User Configuration | Home Manager |
| Shell | Zsh + Oh My Zsh + Powerlevel10k |
| Editor | Neovim |
| File Manager | Yazi |
| Terminal Multiplexer | Tmux |
| GPU Support | NVIDIA (via LD_LIBRARY_PATH) |
🚧 Work in Progress
- Install Nix package manager
- Enable Flakes feature
# Initial deployment
just init-darwin
# Update configuration
just darwin# Initial deployment (hostname: desktop/wsl/vps)
just init-linux <hostname>
# Update configuration
just rebuild <hostname># Update all flake inputs
just up
# Update specific input
just upp <input>
# Clean old generations (older than 7 days)
just clean
# Garbage collection
just gc
# Format nix files
just fmt