Skip to content

Commit

Permalink
feat(lib.create): Expose users module with specified usersDir
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNikov committed Jan 24, 2025
1 parent 39c9877 commit 35c6d21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 8 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@
machinesDir ? null,
usersDir ? null,
}:
let
utils = import ./lib { inherit usersDir rootDir machinesDir; };
in
{
dirs = {
lib = self + "/lib";
Expand All @@ -260,7 +263,11 @@
usersDir
;
};
utils = import ./lib { inherit usersDir rootDir machinesDir; };
inherit utils;
};

modules = {
users = import ./modules/users.nix utils;
};
};
};
Expand Down
7 changes: 1 addition & 6 deletions modules/users.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
usersDir,
rootDir,
machinesDir,
}:
utils:
{
config,
lib,
Expand All @@ -12,7 +8,6 @@ let
cfg = config.users;
enabled = cfg.includedUsers != [ ] || cfg.includedGroups != [ ];

utils = import ../lib { inherit usersDir rootDir machinesDir; };
allUsers = utils.usersInfo;
allGroups =
let
Expand Down

0 comments on commit 35c6d21

Please sign in to comment.