> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/soriphoono/homelab/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring Home Manager Profiles

> Learn how to configure user environments with Home Manager

## Overview

Home Manager configurations define user-specific settings, applications, and dotfiles. These configurations are stored in the `homes/` directory and follow a specific naming pattern.

## Naming Patterns

Home Manager profiles use three naming patterns:

### 1. Global User Configuration

**Pattern:** `homes/username/default.nix`

Applies to a user across all systems where they exist:

```nix homes/soriphoono/default.nix theme={null}
{pkgs, ...}: {
  core = {
    secrets = {
      enable = true;
      defaultSopsFile = ./secrets.yaml;
    };

    git = {
      userName = "soriphoono";
      userEmail = "soriphoono@gmail.com";
    };
  };

  userapps.development.editors.neovim.settings = import ./nvim {inherit pkgs;};
}
```

### 2. Host-Specific User Configuration

**Pattern:** `homes/username@hostname/default.nix`

Overrides or extends settings for a specific system:

```nix homes/soriphoono@zephyrus/default.nix theme={null}
{config, ...}: {
  core = {
    shells.fish.generateCompletions = true;

    git = {
      projectsDir = "${config.home.homeDirectory}/Documents/Projects/";
      extraIdentities = {
        school = {
          directory = "School";
          name = "soriphoono";
          email = "soriphoono@gmail.com";
          signingKey = "ssh-ed25519 AAAA...";
        };
        work = {
          directory = "Work";
          name = "xrezdev11";
          email = "xrezdev11@gmail.com";
          signingKey = "ssh-ed25519 AAAA...";
        };
      };
    };
  };

  userapps = {
    enable = true;
    browsers = {
      chrome.enable = true;
      librewolf.enable = true;
    };
    communication = {
      discord.enable = true;
    };
    data-fortress = {
      nextcloud.enable = true;
      bitwarden.enable = true;
    };
    office = {
      onlyoffice.enable = true;
    };
    development = {
      enable = true;
      terminal = {
        ghostty.enable = true;
      };
      knowledge-management.obsidian.enable = true;
      editors = {
        neovim.enable = true;
        antigravity.enable = true;
      };
      agents = {
        gemini = {
          enable = true;
          enableJules = true;
        };
      };
    };
  };
}
```

### 3. Standalone Home Manager

**Pattern:** `homes/username@global/default.nix`

For systems not managed by NixOS (using standalone Home Manager):

```nix homes/user@global/default.nix theme={null}
{pkgs, ...}: {
  home.stateVersion = "24.05";
  
  core = {
    git = {
      userName = "user";
      userEmail = "user@example.com";
    };
  };
  
  userapps.browsers.firefox.enable = true;
}
```

## Configuration Priority

When a user exists on a system, configurations are merged in this order:

1. `homes/username/default.nix` (global user config)
2. `homes/username@hostname/default.nix` (host-specific overrides)

Host-specific settings override global settings.

## Complete Examples

<Tabs>
  <Tab title="Minimal User">
    A basic configuration with just Git and secrets:

    ```nix homes/spookyskelly/default.nix theme={null}
    {
      core = {
        secrets = {
          enable = true;
          defaultSopsFile = ./secrets.yaml;
        };

        git = {
          userName = "spookyskelly";
          userEmail = "spookyskelly@example.com";
        };
      };
    }
    ```
  </Tab>

  <Tab title="Developer Setup">
    A complete development environment:

    ```nix homes/developer@workstation/default.nix theme={null}
    {config, pkgs, ...}: {
      core = {
        shells.fish.generateCompletions = true;
        
        git = {
          userName = "developer";
          userEmail = "dev@company.com";
          projectsDir = "${config.home.homeDirectory}/Code";
          extraIdentities = {
            personal = {
              directory = "Personal";
              name = "developer";
              email = "dev@personal.com";
              signingKey = "ssh-ed25519 AAAA...";
            };
          };
        };
      };

      userapps = {
        enable = true;
        
        browsers = {
          firefox.enable = true;
          chrome.enable = true;
        };
        
        development = {
          enable = true;
          
          terminal = {
            kitty.enable = true;
            ghostty.enable = true;
          };
          
          editors = {
            neovim.enable = true;
            vscode.enable = true;
            antigravity.enable = true;
          };
          
          domain_specific.k8s.enable = true;
          
          agents = {
            gemini.enable = true;
          };
        };
        
        communication = {
          discord.enable = true;
        };
        
        data-fortress = {
          bitwarden.enable = true;
        };
      };
    }
    ```
  </Tab>

  <Tab title="Host-Specific">
    Light configuration on one machine, full setup on another:

    ```nix homes/user@lg-laptop/default.nix theme={null}
    # Minimal setup for laptop
    {
      core.shells.fish.generateCompletions = true;

      userapps = {
        enable = true;
        browsers = {
          librewolf.enable = true;
          firefox.enable = true;
        };
      };
    }
    ```

    ```nix homes/user@workstation/default.nix theme={null}
    # Full development environment
    {
      core.shells.fish.generateCompletions = true;

      userapps = {
        enable = true;
        browsers.chrome.enable = true;
        development = {
          enable = true;
          editors.neovim.enable = true;
          terminal.ghostty.enable = true;
        };
        office.onlyoffice.enable = true;
      };
    }
    ```
  </Tab>
</Tabs>

## Core Configuration

### Git Configuration

The `core.git` module provides comprehensive Git setup:

<ParamField path="core.git.userName" type="string" required>
  Your Git username
</ParamField>

<ParamField path="core.git.userEmail" type="string" required>
  Your Git email address
</ParamField>

<ParamField path="core.git.projectsDir" type="path" default="~/Documents/Projects">
  Directory where Git projects are stored
</ParamField>

<ParamField path="core.git.extraIdentities" type="attrset" default="{}">
  Additional Git identities for different contexts (work, school, etc.)

  Each identity has:

  * `directory` - Subdirectory under projectsDir
  * `name` - Git user name for this identity
  * `email` - Git email for this identity
  * `signingKey` - SSH key for commit signing
</ParamField>

#### Multiple Git Identities Example

```nix theme={null}
core.git = {
  userName = "soriphoono";
  userEmail = "soriphoono@gmail.com";
  projectsDir = "${config.home.homeDirectory}/Documents/Projects/";
  
  extraIdentities = {
    school = {
      directory = "School";
      name = "soriphoono";
      email = "soriphoono@school.edu";
      signingKey = "ssh-ed25519 AAAA...";
    };
    work = {
      directory = "Work";
      name = "professional";
      email = "professional@company.com";
      signingKey = "ssh-ed25519 AAAA...";
    };
  };
};
```

Projects under `~/Documents/Projects/School/` will use the school identity, while projects under `~/Documents/Projects/Work/` will use the work identity.

### Shell Configuration

<ParamField path="core.shells.fish.generateCompletions" type="boolean" default="false">
  Generate Fish shell completions for installed packages
</ParamField>

<ParamField path="core.shells.starship.enable" type="boolean" default="false">
  Enable Starship prompt
</ParamField>

<ParamField path="core.shells.fastfetch.enable" type="boolean" default="false">
  Enable Fastfetch system info display
</ParamField>

### Secrets Management

<ParamField path="core.secrets.enable" type="boolean" default="false">
  Enable SOPS secrets management
</ParamField>

<ParamField path="core.secrets.defaultSopsFile" type="path">
  Path to the default SOPS secrets file
</ParamField>

## User Applications

The `userapps` namespace provides categorized application modules:

### Browsers

```nix theme={null}
userapps.browsers = {
  firefox.enable = true;
  librewolf.enable = true;
  floorp.enable = true;
  chrome.enable = true;
};
```

<ParamField path="userapps.browsers.firefox.enable" type="boolean" default="false">
  Install Firefox browser
</ParamField>

<ParamField path="userapps.browsers.librewolf.enable" type="boolean" default="false">
  Install LibreWolf (privacy-focused Firefox fork)
</ParamField>

<ParamField path="userapps.browsers.chrome.enable" type="boolean" default="false">
  Install Google Chrome
</ParamField>

### Development Tools

```nix theme={null}
userapps.development = {
  enable = true;
  
  editors = {
    neovim.enable = true;
    vscode.enable = true;
    antigravity.enable = true;
  };
  
  terminal = {
    kitty.enable = true;
    ghostty.enable = true;
    warp.enable = true;
  };
  
  knowledge-management.obsidian.enable = true;
  
  domain_specific.k8s.enable = true;
  
  agents = {
    gemini.enable = true;
    mcp-servers.enable = true;
  };
};
```

<ParamField path="userapps.development.editors.neovim.enable" type="boolean" default="false">
  Install Neovim editor
</ParamField>

<ParamField path="userapps.development.editors.neovim.settings" type="attrset">
  Custom Neovim configuration (plugins, settings, etc.)
</ParamField>

<ParamField path="userapps.development.editors.vscode.enable" type="boolean" default="false">
  Install Visual Studio Code
</ParamField>

<ParamField path="userapps.development.editors.antigravity.enable" type="boolean" default="false">
  Install Antigravity editor
</ParamField>

<ParamField path="userapps.development.terminal.kitty.enable" type="boolean" default="false">
  Install Kitty terminal emulator
</ParamField>

<ParamField path="userapps.development.terminal.ghostty.enable" type="boolean" default="false">
  Install Ghostty terminal emulator
</ParamField>

<ParamField path="userapps.development.domain_specific.k8s.enable" type="boolean" default="false">
  Install Kubernetes tools (kubectl, k9s, helm, etc.)
</ParamField>

<ParamField path="userapps.development.agents.gemini.enable" type="boolean" default="false">
  Install Google Gemini AI assistant
</ParamField>

### Communication

```nix theme={null}
userapps.communication = {
  discord.enable = true;
};
```

<ParamField path="userapps.communication.discord.enable" type="boolean" default="false">
  Install Discord
</ParamField>

### Data Fortress (Security)

```nix theme={null}
userapps.data-fortress = {
  bitwarden.enable = true;
  nextcloud.enable = true;
};
```

<ParamField path="userapps.data-fortress.bitwarden.enable" type="boolean" default="false">
  Install Bitwarden password manager
</ParamField>

<ParamField path="userapps.data-fortress.nextcloud.enable" type="boolean" default="false">
  Install Nextcloud client
</ParamField>

### Office Applications

```nix theme={null}
userapps.office = {
  onlyoffice.enable = true;
};
```

<ParamField path="userapps.office.onlyoffice.enable" type="boolean" default="false">
  Install OnlyOffice suite
</ParamField>

## Advanced Configurations

### Custom Neovim Configuration

You can import complex configurations from subdirectories:

```nix homes/user/default.nix theme={null}
{pkgs, ...}: {
  userapps.development.editors.neovim.settings = import ./nvim {inherit pkgs;};
}
```

Then create `homes/user/nvim/default.nix` with your Neovim configuration.

### Conditional Configuration

Use Nix expressions for conditional setup:

```nix theme={null}
{config, lib, ...}: {
  userapps.development.editors = {
    neovim.enable = true;
    vscode.enable = lib.mkIf (config.home.username == "developer") true;
  };
}
```

## Directory Structure

A complete homes directory might look like:

```
homes/
├── soriphoono/
│   ├── default.nix         # Global config
│   ├── secrets.yaml        # Global secrets
│   └── nvim/
│       └── default.nix     # Neovim config
├── soriphoono@zephyrus/
│   └── default.nix         # Host-specific
├── soriphoono@droid/
│   └── default.nix         # Droid-specific
├── spookyskelly/
│   └── default.nix         # Global config
└── spookyskelly@lg-laptop/
    ├── default.nix         # Host-specific
    └── secrets.yaml        # Host secrets
```

## Using Home Manager Modules

All modules from `modules/home/` are automatically available:

```nix theme={null}
# These modules are loaded automatically
core.git = { ... };
core.shells.fish = { ... };
userapps.browsers.firefox = { ... };
```

See the [Modules documentation](/configuration/modules) for creating custom modules.

## Next Steps

<CardGroup cols={2}>
  <Card title="NixOS Systems" icon="computer" href="/configuration/systems">
    Configure system-level settings
  </Card>

  <Card title="Modules" icon="puzzle-piece" href="/configuration/modules">
    Learn about available modules
  </Card>

  <Card title="Secrets" icon="key" href="/operations/secrets-management">
    Manage secrets with SOPS
  </Card>

  <Card title="Nix-on-Droid" icon="android" href="/configuration/droids">
    Configure Android devices
  </Card>
</CardGroup>
