How to use the provided flake-parts module #7551
Answered
by
terlar
DockterTeagle
asked this question in
Q&A
-
|
Howdy, |
Beta Was this translation helpful? Give feedback.
Answered by
terlar
Jul 26, 2025
Replies: 1 comment 6 replies
-
|
It is consumed like most other flake-parts modules, you import the flake module and then you utilize the exposed interface. {
inputs = {
flake-parts.url = "flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
home-manager = {
url = "home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; }: (
{ withSystem, ... }:
{
systems = [ "x86_64-linux" ];
imports = [ inputs.home-manager.flakeModules.default ];
flake = {
homeModules = {
module1 = {
# home module config
};
module2 = ./module2.nix;
};
homeConfigurations.user = withSystem "x86_64-linux" (
{ pkgs, ... }:
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
{
# user home config
}
];
}
)
};
}
);
} |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
khaneliman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is consumed like most other flake-parts modules, you import the flake module and then you utilize the exposed interface.