mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
Pushing users.users.<name>.packages from matching home-manager users leads to a circular dependency when
one attribute set is calculated from the other.
A configuration pull approach replaces the previous one to break up the circular dependency. This new approach
allows more flexibility in configuring both option sets, including calculating from each other.
EXAMPLE;
```nix
{lib, /* custom arg */ flake, config, ...}: {
home-manager.useUserPackages = true;
home-manager.users = builtins.intersectAttrs (lib.filterAttrs (_: v: v.isNormalUser) config.users.users) (flake.outputs.homeModules.users);
}
```
EXAMPLE;
```nix
{lib, /* custom arg */ flake, config, ...}: {
home-manager.useUserPackages = true;
home-manager.users = { inherit (flake.outputs.homeModules.users) demo-user; };
users.users = lib.mapAttrs (_: _: { isNormalUser = true; }) (lib.filterAttrs (_: v: v.programs.git.enable) config.home-manager.users);
}
```
fixes #594
* options-manual: Remove `users` option set from documentation
The option declaration `users.users` is owned by the upstream
nixos modules and should not be documented by home-manager.
Home-manager declares an incomplete/partial option definition for
`users.users` that cannot be documented without the full definition from
the nixos modules. This partial definition is removed from the options
set while generating documentation for the home-manager nixos module.
|
||
|---|---|---|
| .. | ||
| manual | ||
| release-notes | ||
| static | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| home-configuration-nix-footer.5 | ||
| home-configuration-nix-header.5 | ||
| home-manager-manual.nix | ||
| home-manager.1 | ||
| html-open-tool.nix | ||
| options.html | ||