users-groups module: use buildEnv in per-user profiles

Resolves #31253
This commit is contained in:
Michal Rus 2017-11-05 17:51:18 +01:00
parent d9024786f2
commit 55344df089
No known key found for this signature in database
GPG Key ID: 396762D2C75A20A7

View File

@ -582,13 +582,15 @@ in {
{
environment = {
etc = mapAttrs' (name: { packages, ... }: {
name = "per-user-pkgs/${name}";
value.source = pkgs.symlinkJoin {
name = "per-user-pkgs.${name}";
name = "profiles/per-user/${name}";
value.source = pkgs.buildEnv {
name = "user-environment";
paths = packages;
inherit (config.environment) pathsToLink extraOutputsToInstall;
inherit (config.system.path) ignoreCollisions postBuild;
};
}) (filterAttrs (_: { packages, ... }: packages != []) cfg.users);
profiles = ["/etc/per-user-pkgs/$LOGNAME"];
profiles = ["/etc/profiles/per-user/$USER"];
};
}
];