Personal NixOS/nix-darwin configuration using flakes for cross-platform system management.
This configuration supports multiple hosts with both Linux (NixOS) and macOS (Darwin) systems using a unified flake-based approach.
nixos-config/
├── flake.nix # Main entry point
├── hosts/ # Host-specific configurations
│ ├── imre/ # Linux workstation
│ ├── newarre/ # Linux laptop
│ └── macbook-air/ # macOS laptop
├── modules/
│ ├── core/ # System-level configurations
│ │ ├── linux/ # NixOS-specific modules
│ │ └── macos/ # Darwin-specific modules
│ └── home/ # Home Manager configurations
│ ├── all/ # Cross-platform user configs
│ ├── desktop/ # Desktop applications
│ ├── develop/ # Development tools
│ └── wm/ # Window manager (niri)
│ └── niri/
│ ├── composed-ui/ # Traditional UI (waybar, wofi, swaync)
│ └── quickshell-ui/ # Modern Qt-based shell UI
└── pkgs/ # Custom packages
└── quickshell-config/ # Quickshell configuration package
├── ds/ # Design system components
├── modules/ # UI modules (bar, launcher, etc.)
└── services/ # System services integration
# Clone the repository
git clone <repo-url> ~/nixos-config
cd ~/nixos-config
# Build and switch
sudo nixos-rebuild switch --flake ~/nixos-config
# Update and rebuild
sudo nixos-rebuild switch --upgrade# Using the helper script
./assets/scripts-mac/nix-mac -s # Build and switch
./assets/scripts-mac/nix-mac -l # List generations
./assets/scripts-mac/nix-mac -r # Rollback
# Or manually
sudo darwin-rebuild switch --flake ~/nixos-config#MacBookAir10-1-jose-cribeiroThis configuration uses niri, a scrollable-tiling Wayland compositor, with a custom modular setup.
- Quickshell modern Qt-based shell (optional, can be toggled via
quickshell_config_enable)- Custom design system with Stylix integration
- Modular components (bar, launcher, notifications, dashboard)
- Interactive command system
- Waybar status bar with custom styling (when Quickshell disabled)
- wofi application launcher (when Quickshell disabled)
- swaync notification center (when Quickshell disabled)
- GTK applications ecosystem
- Adwaita Dark unified theming
| Shortcut | Action |
|---|---|
Meta + Space |
Open application launcher (wofi) |
Meta + E |
Emoji picker |
Meta + Alt + L |
Lock screen |
Meta + Q |
Close window |
Meta + Ctrl + Q |
Quit niri |
Meta + F |
Maximize column |
Meta + Shift + F |
Fullscreen window |
| Shortcut | Action |
|---|---|
Meta + ←/→/↑/↓ |
Focus column/window |
Meta + Shift + ←/→/↑/↓ |
Move column/window |
Meta + Ctrl + ↑/↓ |
Switch workspace |
| Shortcut | Action |
|---|---|
Meta + , |
Merge window into left column |
Meta + . |
Split window from column |
Meta + R |
Cycle column widths |
Meta + -/+ |
Resize column width |
Meta + Alt + ←/→ |
Resize window height |
| Shortcut | Action |
|---|---|
Meta + Ctrl + K |
Switch keyboard layout |
Meta + Shift + C |
Screenshot |
Meta + Alt + C |
Screenshot screen |
Meta + Ctrl + C |
Screenshot window |
The niri configuration is modularized for easy customization:
modules/home/wm/niri/
├── default.nix # Main configuration + imports
├── essential-gui/ # GUI applications & utilities
├── keybinds.kdl # All keyboard shortcuts (composed-ui)
├── composed-ui/ # Traditional UI components (when quickshell disabled)
│ ├── waybar/ # Status bar config + CSS
│ ├── wofi/ # App launcher config + CSS
│ └── swaync/ # Notification center config + CSS
├── quickshell-ui/ # Quickshell integration (when enabled)
│ ├── default.nix # Quickshell configuration
│ ├── commands.json # Interactive commands
│ └── keybinds.kdl # Quickshell keybindings
└── services.nix # System services configuration
- Languages: Rust, Erlang/Elixir, Android development
- Editors: VS Code with Wayland support, Claude CLI
- Terminal: Alacritty with nerd fonts
- Shell: Zsh with custom configuration
- Version Control: Git with enhanced tooling
- Android Studio (Linux only)
- Android SDK with accepted licenses
- Platform-specific toolchains
- Core tools: git, vim, wget, tree, curl
- Fonts: All Nerd Fonts installed globally
- Development: Language-specific toolchains
- User applications: Modular package organization
- Dotfiles: Centralized configuration management
- Cross-platform: Shared configs between Linux/macOS
Uses agenix for encrypted secrets with a private git repository.
# Setup decryption key
./scripts/setup-agenix-key.sh- Secure Boot: Linux systems use lanzaboote
- Encrypted secrets: agenix integration
- Polkit: Proper privilege escalation
- Unified configuration: Shared modules between NixOS/Darwin
- Machine-specific options: Host-based customization
- Consistent tooling: Same development environment everywhere
# Format all Nix files
treefmt
# Manual formatting
find . -name "*.nix" -exec nixfmt {} \;- Create
hosts/<hostname>/directory - Add
default.nix,hardware-configuration.nix,options.nix - Update
flake.nixwith new host configuration - Set
quickshell_config_enableinoptions.nixto choose UI system
- System-wide: Add to appropriate
modules/core/file - User-specific: Add to relevant
modules/home/module - Window manager specific: Add to
modules/home/wm/niri/essential-gui/
- Enable Quickshell: Set
quickshell_config_enable = truein host'soptions.nix - Commands: Edit
modules/home/wm/niri/quickshell-ui/commands.json - Excluded apps: Edit
modules/home/wm/niri/quickshell-ui/excluded-apps.json - Quickshell modules: Edit files in
pkgs/quickshell-config/modules/ - Design system: Customize
pkgs/quickshell-config/ds/components
- Enable traditional UI: Set
quickshell_config_enable = falsein host'soptions.nix - Keybinds: Edit
modules/home/wm/niri/composed-ui/keybinds.kdl - Styling: Modify CSS files in
composed-ui/waybar/,composed-ui/wofi/,composed-ui/swaync/ - Applications: Update files in
essential-gui/
# Check niri status
niri msg --help
# Restart niri session
systemctl --user restart niri
# View logs
journalctl --user -u niri
# Quickshell commands (when enabled)
quickshell-config # Run quickshell with custom config
~/.config/niri/start-quickshell # Start/restart quickshell
pgrep -af quickshell # Check running quickshell processes- Niri
- New keybinds to handle windows{}
- Finish the initial setup script
- Remove built in bookmarks on nautilus (Starred, Recent)
- Base64 decode on the commands
- New hosts:
- pihole
- server
- remote servers
- Create move-window-or-to-monitor-up/down and move-column-or-monitor-right. See: focus
This project is licensed under the MIT License - see the LICENSE file for details.