Skip to main content
Home Manager modules configure your personal user environment. They manage dotfiles, application settings, shell configuration, themes, and everything else that lives in your home directory.

What Home Manager modules provide

Unlike system modules that require root access, Home Manager modules configure your personal environment. They work on both NixOS and Darwin, giving you consistent dotfiles across all machines.

Programs

Configure applications like browsers, editors, and terminals

Environment

Shell configuration, environment variables, and PATH

Themes

Fonts, colors, and visual styling

Profiles

Machine profiles for different use cases

Module categories

programs/

Application configuration and program defaults.
Configure which programs to use for common tasks.
modules/home/programs/defaults.nix
{
  garden.programs.defaults = {
    # Shell and terminal
    shell = "zsh";          # bash, zsh, fish, nushell
    terminal = "ghostty";   # ghostty, alacritty, kitty, wezterm, foot
    
    # Applications
    browser = "chromium";   # firefox, chromium, thorium, zen
    editor = "nvim";        # nvim, codium
    fileManager = "cosmic-files"; # cosmic-files, dolphin, nemo
    
    # Desktop environment
    launcher = "rofi";      # rofi, wofi, cosmic-launcher
    bar = "ags";            # waybar, ags, quickshell
    screenLocker = "gtklock"; # swaylock, gtklock, cosmic-greeter
    
    # Utilities
    pager = "less -FR";
    manpager = "nvim +Man!";
    noiseSuppressor = "rnnoise";
  };
}
These defaults are used throughout your configuration to automatically select the right program for each task.
Discord client configuration with custom themes and plugins.
Security testing and penetration testing tool configurations.

environment/

Shell environment, variables, and PATH configuration.
Shell-specific settings for bash, zsh, fish, or nushell.Configures:
  • Shell aliases
  • Shell functions
  • Shell-specific options
  • Prompt customization
Set environment variables for your session.
{
  home.sessionVariables = {
    EDITOR = "nvim";
    BROWSER = "chromium";
    TERMINAL = "ghostty";
  };
}
Add directories to your PATH.
{
  home.sessionPath = [
    "$HOME/.local/bin"
    "$HOME/.cargo/bin"
  ];
}
Configure XDG Base Directory specification paths.Sets standard locations for:
  • XDG_CONFIG_HOME - Configuration files
  • XDG_DATA_HOME - Data files
  • XDG_CACHE_HOME - Cache files
  • XDG_STATE_HOME - State files

themes/

Visual theming and styling.
Configure fonts for your terminal and applications.
modules/home/themes/fonts.nix
{
  garden.style.fonts = {
    enable = true;
    
    name = "Maple Mono";
    italic = "Maple Mono Italic";
    bold = "Maple Mono Bold";
    bold-italic = "Maple Mono Bold Italic";
    
    package = pkgs.maple-mono.truetype;
    size = 14;
  };
}
This configuration:
  • Sets the system font to Maple Mono
  • Configures font variants (italic, bold, etc.)
  • Installs the font package
  • Sets default fallbacks (Symbols Nerd Font, Noto Sans)
  • Works on both NixOS and Darwin
Visual themes that apply across applications.The themes module integrates with:
  • Terminal color schemes
  • GTK/Qt themes
  • Application-specific themes
  • Catppuccin theme variants

Configuration modules

Define profiles for different machine types.
modules/generic/profiles.nix
{
  garden.profiles = {
    graphical.enable = true;     # GUI applications
    headless.enable = false;     # Server without GUI
    workstation.enable = true;   # Development machine
    laptop.enable = false;       # Laptop-specific settings
    server.enable = false;       # Server-specific settings
  };
}
Profiles automatically enable appropriate modules based on machine type.
Core Home Manager configuration.Sets:
  • Home directory location
  • State version for compatibility
  • User information
User-level secrets management with sops-nix.Manage sensitive configuration:
  • API keys
  • SSH keys
  • Application credentials
  • Personal tokens
Disable Home Manager manual generation to save space.
{
  manual = {
    html.enable = false;
    json.enable = false;
    manpages.enable = false;
  };
}
Import external Home Manager modules not part of the core framework.

Usage example

Here’s how you might configure your user environment:
home.nix
{ inputs, pkgs, ... }:
{
  # Import the framework
  imports = [ inputs.garden.homeManagerModules.default ];

  # Machine profile
  garden.profiles = {
    graphical.enable = true;
    workstation.enable = true;
  };

  # Program defaults
  garden.programs.defaults = {
    shell = "zsh";
    terminal = "ghostty";
    browser = "firefox";
    editor = "nvim";
  };

  # Fonts
  garden.style.fonts = {
    name = "Maple Mono";
    size = 14;
  };

  # Environment variables
  home.sessionVariables = {
    EDITOR = "nvim";
    TERMINAL = "ghostty";
  };

  # User packages
  garden.packages = with pkgs; {
    inherit ripgrep fd fzf;
  };
}

Integrating with NixOS

Home Manager can be used standalone or integrated with NixOS:

Standalone (works on any Linux or macOS)

home-manager switch --flake .

Integrated with NixOS

configuration.nix
{
  imports = [ inputs.home-manager.nixosModules.home-manager ];

  home-manager = {
    useGlobalPkgs = true;
    useUserPackages = true;
    
    users.isabel = import ./home.nix;
  };
}

Integrated with nix-darwin

darwin-configuration.nix
{
  imports = [ inputs.home-manager.darwinModules.home-manager ];

  home-manager = {
    useGlobalPkgs = true;
    useUserPackages = true;
    
    users.isabel = import ./home.nix;
  };
}

Key features

Cross-platform compatibility

Home Manager modules work on:
  • NixOS Linux
  • macOS with nix-darwin
  • Any Linux distribution with Nix installed
  • WSL (Windows Subsystem for Linux)

Declarative dotfiles

All your dotfiles are declared in Nix. When you switch configurations, dotfiles are automatically updated.

Profile system

Profiles let you enable groups of related settings with a single option. Enable graphical profile to get a complete desktop environment configuration.

Theme integration

The framework provides consistent theming across all applications using the Catppuccin color scheme by default.

Package installation

Home Manager provides several ways to install packages:
{
  garden.packages = with pkgs; {
    inherit git vim curl;
  };
}
This uses the framework’s package management system, which works consistently across NixOS, Darwin, and Home Manager.

Using home.packages

{
  home.packages = with pkgs; [
    git
    vim
    curl
  ];
}
Standard Home Manager package list.

Using program modules

{
  programs.git = {
    enable = true;
    userName = "Isabel";
    userEmail = "[email protected]";
  };
}
Program-specific modules provide additional configuration options.

Next steps

Generic modules

Shared modules used by both Home Manager and system modules

Base modules

Foundation modules for NixOS and Darwin

Build docs developers (and LLMs) love