1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00
home-manager/docs
Proesmans Bert 216690777e
nixos-module: Fix potential recursion between users.users and home-manager.users (#6622)
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.
2025-03-31 09:19:52 -05:00
..
manual docs: correct improper import of home.nix (#6732) 2025-03-30 09:39:15 -05:00
release-notes home-manager: move tests into new test flake 2025-01-24 22:31:22 +01:00
static docs: add style sheets and scrubDerivations 2024-02-01 01:10:58 +01:00
default.nix nixos-module: Fix potential recursion between users.users and home-manager.users (#6622) 2025-03-31 09:19:52 -05:00
flake.lock docs: add style sheets and scrubDerivations 2024-02-01 01:10:58 +01:00
flake.nix docs: add style sheets and scrubDerivations 2024-02-01 01:10:58 +01:00
home-configuration-nix-footer.5 docs: use nixos-render-docs 2023-12-07 21:28:16 +09:00
home-configuration-nix-header.5 docs: extend home-configuration.nix header 2023-12-07 21:28:18 +09:00
home-manager-manual.nix home-manager-manual: expose options.json 2024-10-10 20:29:24 +02:00
home-manager.1 home-manager: support --log-format flag (#6093) 2025-03-19 13:32:33 -05:00
html-open-tool.nix docs: apply nixfmt 2023-12-09 09:05:16 +01:00
options.html docs: add redirect from the previous options.html 2024-06-09 13:09:00 +02:00