diff --git a/index.html b/index.html index 1d3f4fefe..3bd40a299 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ -
ca.desrt.dconf
or dconf.service
?+
ca.desrt.dconf
or dconf.service
?This manual will eventually describe how to install, use, and extend Home Manager.
@@ -257,33 +257,33 @@ Prepare your Home Manager configuration (home.nix
).
home.nix
will be evaluated when the flake is built,
so it must be present before bootstrap of Home Manager from the flake.
See Section 2.1, “Configuration Example” for introduction about
-writing a Home Manager configuration.
The stateVersion
will be specified in the flake instead of in the configuration file.
Remove the line containing home.stateVersion
in the example.
Set up a flake with a flake.nix
as follows:
{ description = "Home Manager configuration of Jane Doe"; inputs = { - # Specify the source of Home Manager and Nixpkgs - home-manager.url = "github:nix-community/home-manager"; + # Specify the source of Home Manager and Nixpkgs. nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { home-manager, ... }: + outputs = { nixpkgs, home-manager, ... }: let system = "x86_64-linux"; - username = "jdoe"; + pkgs = nixpkgs.legacyPackages.${system}; in { - homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration { - # Specify the path to your home configuration here - configuration = import ./home.nix; + homeConfigurations.jdoe = home-manager.lib.homeManagerConfiguration { + inherit pkgs; - inherit system username; - homeDirectory = "/home/${username}"; - # Update the state version as needed. - # See the changelog here: - # https://nix-community.github.io/home-manager/release-notes.html#sec-release-21.05 - stateVersion = "22.05"; + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ + ./home.nix; + ]; # Optionally use extraSpecialArgs # to pass through arguments to home.nix @@ -295,7 +295,6 @@ and nixos-unstable branch of Nixpkgs. If you would like to use therelease-22.05
branch, change thehome-manager
input url togithub:nix-community/home-manager/release-22.05
andnixpkgs
url togithub:NixOS/nixpkgs/nixos-22.05
. -Make sure to also update to thestateVersion
option accordingly.
lib.hm
.
diff --git a/release-notes.html b/release-notes.html
index d7d1923a1..b5e9c8f1c 100644
--- a/release-notes.html
+++ b/release-notes.html
@@ -4,7 +4,47 @@ The home.stateVersion = "18.09";to your configuration.
The state version in this release includes the changes below. +
home.stateVersion = "18.09";
to your configuration.
+The Flake function homeManagerConfiguration
has been simplified.
+Specifically, the arguments
+
configuration
,
+username
,
+homeDirectory
,
+stateVersion
,
+extraModules
, and
+system
+have been removed. Instead use the new modules
argument, which
+accepts a list of NixOS modules.
Further, the pkgs
argument is now mandatory and should be set to
+nixpkgs.legacyPackages.${system}
where nixpkgs
is the Nixpkgs
+input of your choice.
For example, if your Flake currently contains
homeManagerConfiguration { + configuration = import ./home.nix; + system = "x86_64-linux"; + username = "jdoe"; + homeDirectory = "/home/jdoe"; + stateVersion = "22.05"; + extraModules = [ ./some-extra-module.nix ]; +}
then you can change it to
homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.${system}; + modules = [ + ./home.nix + ./some-extra-module.nix + { + home = { + username = "jdoe"; + homeDirectory = "/home/jdoe"; + stateVersion = "22.05"; + }; + } + ]; +}
Of course, you can move the assignment of home.username
,
+home.homeDirectory
, and home.stateVersion
to some
+other file or simply place them in your home.nix
.
The 22.05 release branch became the stable branch in May, 2022.
This release has the following notable changes:
home-manager +
home-manager — reconfigure a user environment
home-manager
{
build
|
@@ -84,7 +84,7 @@
|
--verbose
}
- ]
This command updates the user environment so that it corresponds to the
configuration specified in ~/.config/nixpkgs/home.nix
or ~/.config/nixpkgs/flake.nix
.
@@ -153,7 +153,7 @@ available for immediate garbage collection.
-
The tool accepts the options
-A attrPath
@@ -265,15 +265,15 @@
--verbose
Activates verbose output. -