1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-19 23:03:01 +00:00
home-manager/docs/manual/nix-flakes/flake-parts.md
Austin Horstman 2c87a6475f
flake-module: rename homeManagerModules to homeModules (#6406)
This reverts commit 066ba0c5cf. After
further discussion, we want to maintain this as the naming scheme going
forward to be similar to standards that have been trying to be
implemented in naming configurations and modules.
2025-03-08 19:14:01 +01:00

39 lines
1.2 KiB
Markdown

# flake-parts module {#sec-flakes-flake-parts-module}
When using [flake-parts](https://flake.parts)
you may wish to import Home Manager's flake module,
`flakeModules.home-manager`.
``` nix
{
description = "flake-parts configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
# Import home-manager's flake module
inputs.home-manager.flakeModules.home-manager
];
flake = {
# Define `homeModules`, `homeConfigurations`,
# `nixosConfigurations`, etc here
};
# See flake.parts for more features, such as `perSystem`
};
}
```
The flake module defines the `flake.homeModules` and `flake.homeConfigurations`
options, allowing them to be properly merged if they are defined in multiple
modules.
If you are only defining `homeModules` and/or `homeConfigurations` once in a
single module, flake-parts should work fine without importing
`flakeModules.home-manager`.