Skip to content

Commit 56fe93d

Browse files
committed
feat(lib.create): Expose users module with specified usersDir
1 parent 583aba5 commit 56fe93d

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-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

packages/secret/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ pkgs.writeShellApplication {
8686
8787
if [ "$vm" = "true" ]; then
8888
RULES="$(nix eval --raw ".#nixosConfigurations.$machine.config.virtualisation.vmVariant.mcl.secrets.services.$service.nix-file")"
89+
secretsFolder="./modules/default-vm-config/secrets/$service"
8990
else
9091
RULES="$(nix eval --raw ".#nixosConfigurations.$machine.config.mcl.secrets.services.$service.nix-file")"
9192
fi

0 commit comments

Comments
 (0)