mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
lib/private: refactor mapHomeManagerUser
This commit is contained in:
parent
9be7f20438
commit
516b6e84d2
@ -14,16 +14,16 @@ rec {
|
|||||||
isNormalUser = lib.mkForce true;
|
isNormalUser = lib.mkForce true;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
({ lib, ... }: {
|
||||||
imports = [
|
|
||||||
{ users.users."${user}" = defaultUserConfig; }
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users."${user}" = { ... }: {
|
home-manager.users."${user}" = { ... }: {
|
||||||
imports = [ (getUser "home-manager" user) ];
|
imports = [ (getUser "home-manager" user) ];
|
||||||
};
|
};
|
||||||
users.users."${user}" = settings;
|
|
||||||
};
|
users.users."${user}" = lib.mkMerge [
|
||||||
|
defaultUserConfig
|
||||||
|
settings
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
getSecret = path: ../secrets/${path};
|
getSecret = path: ../secrets/${path};
|
||||||
|
|
||||||
@ -44,8 +44,7 @@ rec {
|
|||||||
(r: r)
|
(r: r)
|
||||||
users';
|
users';
|
||||||
|
|
||||||
getUser = type: user:
|
getUser = type: user: ../users/${type}/${user};
|
||||||
lib.getAttr user (getUsers type [ user ]);
|
|
||||||
|
|
||||||
# Import modules with a set blocklist.
|
# Import modules with a set blocklist.
|
||||||
importModules = attrs:
|
importModules = attrs:
|
||||||
|
Loading…
Reference in New Issue
Block a user