forked from DGNum/infrastructure
fix(lib): Update due to meta rework
This commit is contained in:
parent
85c651a139
commit
f71eedba77
1 changed files with 12 additions and 10 deletions
|
@ -3,27 +3,29 @@ _:
|
||||||
let
|
let
|
||||||
sources = import ../npins;
|
sources = import ../npins;
|
||||||
|
|
||||||
lib =
|
lib = import sources.nix-lib {
|
||||||
(import sources.nix-lib {
|
inherit ((import sources.nixpkgs { })) lib;
|
||||||
inherit ((import sources.nixpkgs { })) lib;
|
|
||||||
|
|
||||||
keysRoot = ../keys;
|
keysRoot = ../keys;
|
||||||
}).extra;
|
};
|
||||||
|
|
||||||
meta = import ../meta;
|
meta = import ../meta lib;
|
||||||
|
|
||||||
|
inherit (lib.extra) getAllKeys;
|
||||||
in
|
in
|
||||||
lib
|
|
||||||
|
lib.extra
|
||||||
// rec {
|
// rec {
|
||||||
# Get publickeys associated to a node
|
# Get publickeys associated to a node
|
||||||
getNodeKeys =
|
getNodeKeys =
|
||||||
node:
|
node:
|
||||||
let
|
let
|
||||||
names =
|
names =
|
||||||
builtins.foldl' (names: group: names ++ meta.members.groups.${group})
|
builtins.foldl' (names: group: names ++ meta.organization.groups.${group})
|
||||||
(meta.nodes.${node}.admins ++ [ "/machines/${node}" ])
|
(meta.nodes.${node}.admins ++ [ "/machines/${node}" ])
|
||||||
meta.nodes.${node}.adminGroups;
|
meta.nodes.${node}.adminGroups;
|
||||||
in
|
in
|
||||||
rootKeys ++ (lib.getAllKeys names);
|
rootKeys ++ (getAllKeys names);
|
||||||
|
|
||||||
rootKeys = lib.getAllKeys meta.members.groups.root;
|
rootKeys = getAllKeys meta.organization.groups.root;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue