Skip to content

Commit f42b48c

Browse files
MartinNikovPetarKirov
authored andcommitted
feat(lib.create): Expose users module with specified usersDir
1 parent 041499d commit f42b48c

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
@@ -240,6 +240,9 @@
240240
machinesDir ? null,
241241
usersDir ? null,
242242
}:
243+
let
244+
utils = import ./lib { inherit usersDir rootDir machinesDir; };
245+
in
243246
{
244247
dirs = {
245248
lib = self + "/lib";
@@ -256,7 +259,11 @@
256259
usersDir
257260
;
258261
};
259-
utils = import ./lib { inherit usersDir rootDir machinesDir; };
262+
inherit utils;
263+
};
264+
265+
modules = {
266+
users = import ./modules/users.nix utils;
260267
};
261268
};
262269
};

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)