lib/private: refactor mapHomeManagerUser

This commit is contained in:
Gabriel Arazas 2023-10-03 21:33:16 +08:00
parent 9be7f20438
commit 516b6e84d2
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -14,16 +14,16 @@ rec {
isNormalUser = lib.mkForce true;
};
in
{
imports = [
{ users.users."${user}" = defaultUserConfig; }
];
({ lib, ... }: {
home-manager.users."${user}" = { ... }: {
imports = [ (getUser "home-manager" user) ];
};
users.users."${user}" = settings;
};
users.users."${user}" = lib.mkMerge [
defaultUserConfig
settings
];
});
getSecret = path: ../secrets/${path};
@ -44,8 +44,7 @@ rec {
(r: r)
users';
getUser = type: user:
lib.getAttr user (getUsers type [ user ]);
getUser = type: user: ../users/${type}/${user};
# Import modules with a set blocklist.
importModules = attrs: