mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-25 06:19:00 +00:00
lib/private: create getSecrets
At least it is easier to get them now.
This commit is contained in:
parent
f7a27479b2
commit
dc8d6e8d55
@ -27,6 +27,13 @@ rec {
|
|||||||
|
|
||||||
getSecret = path: ../secrets/${path};
|
getSecret = path: ../secrets/${path};
|
||||||
|
|
||||||
|
getSecrets = sopsFile: secrets:
|
||||||
|
let
|
||||||
|
getKey = key: { inherit key sopsFile; };
|
||||||
|
in
|
||||||
|
lib.mapAttrs (path: attrs:
|
||||||
|
attrs // (getKey path)) secrets;
|
||||||
|
|
||||||
getUsers = type: users:
|
getUsers = type: users:
|
||||||
let
|
let
|
||||||
userModules = lib.filesToAttr ../users/${type};
|
userModules = lib.filesToAttr ../users/${type};
|
||||||
@ -59,5 +66,5 @@ rec {
|
|||||||
"profiles"
|
"profiles"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
lib.filterAttrs (n: v: !lib.elem n blocklist) (lib.mapAttrsRecursive (_: path: import path) attrs);
|
lib.filterAttrs (n: v: !lib.elem n blocklist) (lib.mapAttrsRecursive (_: sopsFile: import sopsFile) attrs);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user