A comprehensive, cross-platform Nix Home Manager configuration for managing development environments across macOS and Linux systems.
Gibbix is a flake-based Home Manager configuration that provides:
- Declarative environment management - Version control your entire development setup
- Cross-platform consistency - Same tools and configurations across macOS and Linux
- Modular design - Easy to customize and extend for different use cases
- Reproducible builds - Deterministic package management with Nix flakes
This configuration supports five different host systems:
| Host | System | Architecture | Profile |
|---|---|---|---|
work-mac |
macOS | Apple Silicon (aarch64) | Work |
work-linux |
Linux | ARM64 (aarch64) | Work |
personal-mac |
macOS | Apple Silicon (aarch64) | Personal |
nas |
Linux | x86_64 | Personal |
pi |
Linux | ARM64 (aarch64) | Personal |
Before using this configuration, ensure you have:
- Nix Package Manager (with flakes enabled)
- Home Manager (installed via this configuration)
- Git (for cloning the repository)
sh <(curl -L https://nixos.org/nix/install) --daemonAdd the following to ~/.config/nix/nix.conf (create if it doesn't exist):
experimental-features = nix-command flakes
Or set it globally in /etc/nix/nix.conf:
experimental-features = nix-command flakes
git clone https://github.com/ScottGibb/Gibbix.git ~/.config/home-manager
cd ~/.config/home-managerSelect the appropriate configuration for your system:
nix switch --flake ~/.config/home-manager#scogib01@work-macnix switch --flake ~/.config/home-manager#scott@work-linuxnix switch --flake ~/.config/home-manager#scottgibb@personal-macnix switch --flake ~/.config/home-manager#pi@nasnix switch --flake ~/.config/home-manager#pi@piOnce Home Manager is installed, you can apply future changes with:
home-manager switch --flake ~/.config/home-manager#<your-config>flake.nix- Defines all Home Manager configurations and outputshome.nix- Base configuration imported by all hostshosts/- System-specific settings (username, home directory, packages)modules/- Reusable configuration modules for specific purposes
Update flake inputs (nixpkgs, home-manager):
nix flake update
home-manager switchValidate your configuration without applying:
nix flake check --all-systemsFormat all .nix files using the configured formatter:
nix fmt **/*.nixList all packages installed by Home Manager:
home-manager packagesTo add a new host configuration:
- Create a host file in
hosts/:
# hosts/new-host.nix
{ pkgs, lib, ... }:
{
home.username = "yourusername";
home.homeDirectory = "/home/yourusername"; # or /Users/yourusername on macOS
home.packages = with pkgs; [
# Host-specific packages
];
}- Add the configuration to
flake.nix:
"yourusername@new-host" = mkHomeConfiguration "x86_64-linux" [
./home.nix
./modules/personal.nix # or ./modules/work.nix
./hosts/new-host.nix
];- Apply the configuration:
home-manager switch --flake ~/.config/home-manager#yourusername@new-hostIf you see error: experimental Nix feature 'flakes' is disabled:
-
Add to
~/.config/nix/nix.conf:experimental-features = nix-command flakes -
Restart your terminal or run:
source /etc/bashrc # or /etc/zshrc
If you get package collision errors:
- Check for duplicate packages in your configuration
- Use
lib.mkForceto override conflicting options - Review your
home.packageslists for duplicates
If a build fails:
- Check the error message carefully
- Ensure you're on a supported system architecture
- Try updating inputs:
nix flake update - Check GitHub Actions for known issues
If Home Manager complains about existing files:
- Backup your existing dotfiles
- Remove conflicting files
- Run
home-manager switchagain