Merge pull request #31283 from michalrus/per-user-profiles-buildEnv
users-groups module: use `buildEnv` in per-user profiles
This commit is contained in:
commit
3ea493430a
@ -582,13 +582,15 @@ in {
|
|||||||
{
|
{
|
||||||
environment = {
|
environment = {
|
||||||
etc = mapAttrs' (name: { packages, ... }: {
|
etc = mapAttrs' (name: { packages, ... }: {
|
||||||
name = "per-user-pkgs/${name}";
|
name = "profiles/per-user/${name}";
|
||||||
value.source = pkgs.symlinkJoin {
|
value.source = pkgs.buildEnv {
|
||||||
name = "per-user-pkgs.${name}";
|
name = "user-environment";
|
||||||
paths = packages;
|
paths = packages;
|
||||||
|
inherit (config.environment) pathsToLink extraOutputsToInstall;
|
||||||
|
inherit (config.system.path) ignoreCollisions postBuild;
|
||||||
};
|
};
|
||||||
}) (filterAttrs (_: { packages, ... }: packages != []) cfg.users);
|
}) (filterAttrs (_: { packages, ... }: packages != []) cfg.users);
|
||||||
profiles = ["/etc/per-user-pkgs/$LOGNAME"];
|
profiles = ["/etc/profiles/per-user/$USER"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user