Files
nixpkgs/docs/modules/home-manager/overview.md
m3tm3re 00b858fbbe docs: update documentation for latest changes
- Add stt-ptt language support documentation
- Add rofi-project-opener module documentation
- Add rofi-project-opener package documentation
- Update zellij-ps documentation
- Update guides and reference patterns
- Update AGENTS.md with latest commands
2026-01-10 19:12:45 +01:00

3.5 KiB

Home Manager Modules Overview

Overview of available Home Manager modules in m3ta-nixpkgs.

Available Modules

Core Modules

  • ports - Port management across hosts

CLI Modules (cli/)

Coding Modules (coding/)

Importing Modules

Import All Modules

{config, ...}: {
  imports = [
    m3ta-nixpkgs.homeManagerModules.default
  ];
}

Import Specific Module

{config, ...}: {
  imports = [
    m3ta-nixpkgs.homeManagerModules.ports
    m3ta-nixpkgs.homeManagerModules.zellij-ps
  ];
}

Import Category

{config, ...}: {
  imports = [
    m3ta-nixpkgs.homeManagerModules.cli.zellij-ps
    m3ta-nixpkgs.homeManagerModules.coding.editors
  ];
}

Module Namespace

All Home Manager modules use the m3ta.* namespace:

# Port management
m3ta.ports = {
  enable = true;
  definitions = {dev-server = 3000;};
};

# CLI tools
cli.zellij-ps = {
  enable = true;
};

# Coding tools
coding.editors = {
  enable = true;
  neovim.enable = true;
};

Module Categories

Core

Essential modules for all users:

  • ports - Port management with optional environment variable generation

CLI (cli/)

Command-line interface tools and utilities:

  • zellij-ps - Project switcher for Zellij terminal multiplexer

Coding (coding/)

Development tools and configurations:

  • editors - Editor configurations (Neovim, Zed, etc.)

Integration Examples

With NixOS

{config, ...}: {
  # NixOS modules
  imports = [
    m3ta-nixpkgs.nixosModules.default
  ];

  # Home Manager integration
  home-manager.users.myusername = {
    imports = [
      m3ta-nixpkgs.homeManagerModules.default
    ];

    m3ta.ports = {
      enable = true;
      definitions = {
        dev-server = 3000;
      };
      currentHost = config.networking.hostName;
    };
  };
}

Standalone Home Manager

{config, pkgs, ...}: {
  imports = [
    m3ta-nixpkgs.homeManagerModules.default
  ];

  m3ta.ports = {
    enable = true;
    definitions = {
      dev-server = 3000;
    };
    currentHost = "desktop";
  };

  cli.zellij-ps = {
    enable = true;
  };

  coding.editors = {
    enable = true;
    neovim.enable = true;
  };
}

Module Locations

Core

  • modules/home-manager/ports.nix - Port management module

CLI

  • modules/home-manager/cli/default.nix - CLI module aggregator
  • modules/home-manager/cli/zellij-ps.nix - Zellij project switcher

Coding

  • modules/home-manager/coding/default.nix - Coding module aggregator
  • modules/home-manager/coding/editors.nix - Editor configurations

Adding New Modules

Core Module

  1. Create: modules/home-manager/my-module.nix
  2. Add to modules/home-manager/default.nix

CLI Module

  1. Create: modules/home-manager/cli/my-tool.nix
  2. Add to modules/home-manager/cli/default.nix

Coding Module

  1. Create: modules/home-manager/coding/my-tool.nix
  2. Add to modules/home-manager/coding/default.nix

Module Template

{ config, lib, pkgs, ... }:
with lib; let
  cfg = config.m3ta.category.myModule;
in {
  options.m3ta.category.myModule = {
    enable = mkEnableOption "my module";
    # ... options
  };

  config = mkIf cfg.enable {
    # Configuration
  };
}