Skip to content

Commit c9da533

Browse files
committed
feat(lib.create): Expose users module with specified usersDir
1 parent 7d1a2f6 commit c9da533

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

flake.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@
244244
machinesDir ? null,
245245
usersDir ? null,
246246
}:
247+
let
248+
utils = import ./lib { inherit usersDir rootDir machinesDir; };
249+
in
247250
{
248251
dirs = {
249252
lib = self + "/lib";
@@ -260,7 +263,11 @@
260263
usersDir
261264
;
262265
};
263-
utils = import ./lib { inherit usersDir rootDir machinesDir; };
266+
inherit utils;
267+
};
268+
269+
modules = {
270+
users = import ./modules/users.nix utils;
264271
};
265272
};
266273
};

modules/users.nix

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
{
2-
usersDir,
3-
rootDir,
4-
machinesDir,
5-
}:
1+
utils:
62
{
73
config,
84
lib,
@@ -12,7 +8,6 @@ let
128
cfg = config.users;
139
enabled = cfg.includedUsers != [ ] || cfg.includedGroups != [ ];
1410

15-
utils = import ../lib { inherit usersDir rootDir machinesDir; };
1611
allUsers = utils.usersInfo;
1712
allGroups =
1813
let

0 commit comments

Comments
 (0)