diff --git a/index.xhtml b/index.xhtml index a2a0bcde9..6803c98f9 100644 --- a/index.xhtml +++ b/index.xhtml @@ -33,7 +33,7 @@
Table of Contents
ca.desrt.dconf or dconf.service? Table of Contents
ca.desrt.dconf or dconf.service? This manual will eventually describe how to install, use, and extend Home Manager.
If you encounter problems then please reach out on the IRC channel #home-manager @@ -446,7 +446,7 @@ user profiles to be built together with the system when running description of this setup.
This allows the user profiles to be built together with the system
when running darwin-rebuild. See nix-darwin
module for a description of this
-setup.
Table of Contents
Install Nix 2.4 or later, or have it in nix-shell.
Enable experimental features nix-command and flakes.
When using NixOS, add the following to your configuration.nix
+setup.
Table of Contents
Install Nix 2.4 or later, or have it in nix-shell.
Enable experimental features nix-command and flakes.
When using NixOS, add the following to your configuration.nix
and rebuild your system.
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
@@ -556,6 +556,36 @@ to that of NixOS. The flake.nix would be:<
and it is also rebuilt with the nix-darwin generations. The rebuild
command here may be darwin-rebuild switch --flake <flake-uri>.
You can use the above flake.nix as a template in ~/.config/darwin by
$ nix flake new ~/.config/darwin -t github:nix-community/home-manager#nix-darwin
+When using flake-parts
+you may wish to import home-manager’s flake module,
+flakeModules.home-manager.
{
+ 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.
The module system in Home Manager is based entirely on the NixOS module system so we will here only highlight aspects that are specific for Home