mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
Revert "nixos-module: Fix potential recursion between users.users and home-ma…" (#6745)
This reverts commit 216690777e.
Reverts #6622
Seems to be causing issues for other users, though. Will revert and we can try again with some tests in place.
This commit is contained in:
parent
55cf1f1632
commit
0afad8f080
2 changed files with 9 additions and 19 deletions
|
|
@ -50,13 +50,6 @@ let
|
|||
};
|
||||
|
||||
in {
|
||||
options.users.users = mkOption {
|
||||
type = types.attrsOf (types.submodule ({ name, config, ... }: {
|
||||
config.packages = mkIf ((config.enable or true) && cfg.useUserPackages
|
||||
&& lib.hasAttr name cfg.users) [ cfg.users.${name}.home.path ];
|
||||
}));
|
||||
};
|
||||
|
||||
options.home-manager = {
|
||||
useUserPackages = mkEnableOption ''
|
||||
installation of user packages through the
|
||||
|
|
@ -111,7 +104,10 @@ in {
|
|||
};
|
||||
|
||||
config = (lib.mkMerge [
|
||||
# Fix potential recursion when configuring home-manager users based on values in users.users #594
|
||||
(mkIf (cfg.useUserPackages && cfg.users != { }) {
|
||||
users.users = (lib.mapAttrs
|
||||
(_username: usercfg: { packages = [ usercfg.home.path ]; }) cfg.users);
|
||||
environment.pathsToLink = [ "/etc/profile.d" ];
|
||||
})
|
||||
(mkIf (cfg.users != { }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue