From d78efbd86b92cf3851ff9804e8bd3bec5a6c2eb2 Mon Sep 17 00:00:00 2001
From: ncfavier
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
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
Here is a collection of tools and extensions that relate to Home +
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 .#all
Here is a collection of tools and extensions that relate to Home Manager. Note, these are maintained outside the regular Home Manager flow so quality and support may vary wildly. If you encounter problems then please raise them in the corresponding project, not as issues in