mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
lib/private: update getUsers implementation
This commit is contained in:
parent
a6fcc6eec6
commit
8fbbc0ca6d
@ -34,7 +34,7 @@ rec {
|
|||||||
userModules = lib.filesToAttr ../users/${type};
|
userModules = lib.filesToAttr ../users/${type};
|
||||||
invalidUsernames = [ "config" "modules" ];
|
invalidUsernames = [ "config" "modules" ];
|
||||||
|
|
||||||
users' = lib.filterAttrs (n: _: !lib.elem n invalidUsernames && lib.elem n users) userModules;
|
users' = lib.removeAttrs userModules invalidUsernames;
|
||||||
userList = lib.attrNames users';
|
userList = lib.attrNames users';
|
||||||
|
|
||||||
nonExistentUsers = lib.filter (name: !lib.elem name userList) users;
|
nonExistentUsers = lib.filter (name: !lib.elem name userList) users;
|
||||||
|
Loading…
Reference in New Issue
Block a user