diff --git a/index.html b/index.html index 04245c88c..d61eaaa41 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.
@@ -560,7 +560,7 @@ If you refer to an option then write its full attribute path. That is, instead o
The option 'foo' has been deprecated, please use 'bar' instead.
it should read
The option 'services.myservice.foo' has been deprecated, please use 'services.myservice.bar' instead.
A new module, say foo.nix
, should always include a news entry that has a message along the lines of
-
A new module is available: 'services.foo'.
If the module is platform specific, e.g., a service module using systemd, then a condition like
condition = hostPlatform.isLinux;
should be added. If you contribute a module then you don’t need to add this entry, the merger will create an entry for you.
Home Manager includes a basic test suite and it is highly recommended to include at least one test when adding a module. Tests are typically in the form of "golden tests" where, for example, a generated configuration file is compared to a known correct file.
It is relatively easy to create tests by modeling the existing tests, found in the tests
project directory.
The full Home Manager test suite can be run by executing
$ nix-shell --pure tests -A run.all
in the project root. List all test cases through
$ nix-shell --pure tests -A list
and run an individual test, for example alacritty-empty-settings
, through
$ nix-shell --pure tests -A run.alacritty-empty-settings
Home Manager currently installs packages into the user environment, precisely as if the packages were installed through nix-env --install
. This means that you will get a collision error if your Home Manager configuration attempts to install a package that you already have installed manually, that is, packages that shows up when you run nix-env --query
.
For example, imagine you have the hello
package installed in your environment
$ nix-env --query +A new module is available: 'services.foo'.If the module is platform specific, e.g., a service module using systemd, then a condition like
condition = hostPlatform.isLinux;should be added. If you contribute a module then you don’t need to add this entry, the merger will create an entry for you.
Home Manager includes a basic test suite and it is highly recommended to include at least one test when adding a module. Tests are typically in the form of "golden tests" where, for example, a generated configuration file is compared to a known correct file.
It is relatively easy to create tests by modeling the existing tests, found in the tests
project directory.
The full Home Manager test suite can be run by executing
$ nix-shell --pure tests -A run.all
in the project root. List all test cases through
$ nix-shell --pure tests -A list
and run an individual test, for example alacritty-empty-settings
, through
$ nix-shell --pure tests -A run.alacritty-empty-settings
However, those invocations will impurely source the system’s nixpkgs, and may cause failures. To run against the nixpkgs from the flake.lock, use instead e.g.
$ nix develop --ignore-environment .#tests.all
Home Manager currently installs packages into the user environment, precisely as if the packages were installed through nix-env --install
. This means that you will get a collision error if your Home Manager configuration attempts to install a package that you already have installed manually, that is, packages that shows up when you run nix-env --query
.
For example, imagine you have the hello
package installed in your environment
$ nix-env --query hello-2.10
and your Home Manager configuration contains
home.packages = [ pkgs.hello ];
Then attempting to switch to this configuration will result in an error similar to
$ home-manager switch these derivations will be built: /nix/store/xg69wsnd1rp8xgs9qfsjal017nf0ldhm-home-manager-path.drv diff --git a/tools.html b/tools.html index 958fd69c3..d062d188c 100644 --- a/tools.html +++ b/tools.html @@ -1,6 +1,6 @@ -Appendix D. Tools
- home-manager - — reconfigure a user environment
Name
home-manager +
Appendix D. Tools
- home-manager + — reconfigure a user environment
Name
home-manager — reconfigure a user environment
Synopsis
home-manager
{ build | @@ -84,7 +84,7 @@ | --verbose } - ]Description
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.
-
Options
The tool accepts the options
-A
@@ -265,15 +265,15 @@attrPath
--verbose
Activates verbose output. -